[PHP-DEV] [RFC] Deprecate properties using var

2015-02-12 Thread Pierre du Plessis
to use proper visibility when defining properties. [0] https://wiki.php.net/rfc/remove_php4_constructors Regards Pierre du Plessis

Re: [PHP-DEV] - True Annotations

2013-01-09 Thread 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

Re: [PHP-DEV] array_map() function modification

2013-01-12 Thread Pierre du Plessis
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

Re: [PHP-DEV] [VOTE] array_column() function

2013-02-27 Thread Pierre du Plessis
> 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

Re: [PHP-DEV] __invokeStatic() method

2013-03-16 Thread Pierre du Plessis
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. >

Re: [PHP-DEV] __invokeStatic() method

2013-03-17 Thread Pierre du Plessis
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

Re: [PHP-DEV] __invokeStatic() method

2013-03-19 Thread Pierre du Plessis
> 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

Re: [PHP-DEV] __invokeStatic() method

2013-03-19 Thread Pierre du Plessis
> 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() &

Re: [PHP-DEV] __invokeStatic() method

2013-03-19 Thread Pierre du Plessis
> 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

Re: [PHP-DEV] Method check - Can someone create a RFC for it?

2013-03-20 Thread Pierre du Plessis
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

Re: [PHP-DEV] Scalar Type Casting Magic Methods

2013-05-07 Thread Pierre du Plessis
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

Re: [PHP-DEV] Proposal for new array_map function to pass in keys

2013-06-08 Thread Pierre du Plessis
> 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)

Re: [PHP-DEV] New syntax for multidimensional array loop with foreach

2013-06-27 Thread Pierre du Plessis
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? > > >

Re: [PHP-DEV] New syntax for multidimensional array loop with foreach

2013-06-27 Thread Pierre du Plessis
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: >

Re: [PHP-DEV] RFC: Anonymous Classes

2013-09-24 Thread Pierre du Plessis
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

Re: [PHP-DEV] [RFC] path_join function

2023-05-17 Thread Pierre du Plessis
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