to use proper visibility when defining properties.
[0] https://wiki.php.net/rfc/remove_php4_constructors
Regards
Pierre du Plessis
The # would be parsed as a comment
Kind Regards
Pierre du Plessis
*Cell*: 072 775 3477
*Fax*: 086 650 4991
*Email*: i...@customscripts.co.za
*www*: http://www.customscripts.co.za
On Wed, Jan 9, 2013 at 3:27 PM, Nikita Nefedov wrote:
> No please, two symbols for each side looks ugly.
&g
ded, as it is very easily implement in user-land
with a few lines of code.
On Sat, Jan 12, 2013 at 9:41 PM, Thomas Hruska wrote:
> array_combine($keys, array_map(null, $vals, $vals2, $vals3));
Kind Regards
Pierre du Plessis
*Cell*: 072 775 3477
*Fax*: 086 650 4991
*Email*: i...@cust
> On 12 January 2013 00:17, Ben Ramsey wrote:
> > I've opened voting for the array_column() function RFC.
> >
> > You can vote at https://wiki.php.net/rfc/array_column#voting
> >
> > Regards,
> > Ben
> >
>
> The vote has been open for almost three weeks and discussion tailed
> off after only a few
On Mar 16, 2013 9:35 PM, "Daniele Orlando" wrote:
>
> Hi List,
>
> I'm interested in proposing an RFC and I would know your opinion.
>
> === Current Situation ===
> Since PHP 5.3 we can use an object instance, who defines the __invoke()
> method, as a callable object.
> Example:
>
> // PHP Code.
>
On Mar 18, 2013 2:41 AM, "Thomas Bley" wrote:
>
> On Sat, Mar 16, 2013 at 9:33 PM, Pierre du Plessis
> wrote:
> > On Mar 16, 2013 9:35 PM, "Daniele Orlando" wrote:
> >>
> >> Hi List,
> >>
> >> I'm interested in pro
> Hi,
>
> Le Mon, 18 Mar 2013 09:07:43 +0200, Matīss Roberts Treinis a écrit :
> > Not only that. This potentially might break compatibility with many
> > software products already out there.
>
> I don't see how it could break existing software as it is not a
> modification of an existing method bu
> Le Tue, 19 Mar 2013 09:37:43 +0200, Pierre du Plessis a écrit :
> > It would break existing software if you have a class and function with
> > the same name.
> > Consider the following example:
> >
> > class foo {
> > }
> >
> > function foo()
&
> It is clear to me that there are valid reasons to say yes to this proposal,
> but there are a lot to say no too.
> Even if it could be interesting in theory, due to of how PHP handles
> collisions between classes and functions names (no check at all),
> implementing a callable class could break e
On 03/20/2013 11:43 AM, Carlos Rodrigues wrote:
> Like Mike emaild me, i can just change my code to something like
>> $obj->getImage()->getUrl(), where getImage() will return a mock object
>> with getUrl() returning an empty string.
>>
>> But my request here is not about this case only.
>> Imagin
The __toArray can be useful if you want to perform array functions on the
object (E.G array_filter), otherwise I think it would be very useful if the
array functions can accept an object implementing ArrayAccess as well
instead of just an array
On May 7, 2013 8:40 PM, "Nikita Popov" wrote:
> On S
> function my_call_back($key, $value) {
> return array($value, strlen($value));
> }
> $array = str_word_count("PHP is lots of fun!");
> $array = array_map_key('my_call_back', $array);
>
>
> The result would be the following array:
>
> array(5) {
> ["PHP"]=>
> int(3)
> ["is"]=>
> int(2)
On Thu, Jun 27, 2013 at 6:14 PM, Johannes Schlüter
wrote:
> On Thu, 2013-06-27 at 16:58 +0200, Nikita Popov wrote:
> > On Thu, Jun 27, 2013 at 4:10 PM, Christian Stoller >wrote:
> >
> > > The new syntax could make it shorter and faster to write... but maybe
> it's
> > > a bit too confusing?
> > >
On Thu, Jun 27, 2013 at 7:29 PM, Tjerk Anne Meesters wrote:
> On Fri, Jun 28, 2013 at 1:13 AM, Pierre du Plessis
> wrote:
>
> > On Thu, Jun 27, 2013 at 6:14 PM, Johannes Schlüter
> > wrote:
> >
> > > On Thu, 2013-06-27 at 16:58 +0200, Nikita Popov wrote:
>
On 24 September 2013 14:51, Nicolas Grekas wrote:
> What about allowing a "use" statement on these methods?
>
> $someFoo = "bar";
>
> $object = new class{
> function method() use ($someFoo) { return $someFoo;}
> }
>
> $object->method(); // "bar";
>
I think the idea of anonymous classes is ve
On Wed, 17 May 2023 at 18:24, Gunnard engebreth wrote:
>
> > Maybe im missing something here but the already available `dirname()`
> does this. right?
> https://www.php.net/manual/en/function.dirname.php
>
>
dirname just traverses up the directory, it doesn't join paths.
For example, this exampl
16 matches
Mail list logo