Re: PR 287 - added use_keys argument to array_filter() [Discussion]

From: Date: Tue, 18 Jun 2013 14:58:07 +0000
Subject: Re: PR 287 - added use_keys argument to array_filter() [Discussion]
References: 1  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
> I'm starting up a thread for discussion on Pull Request 287
> https://github.com/php/php-src/pull/287
> (allowing array keys to be passed
> to the callback function of array_filter through a third optional boolean
> argument). I would like to merge this into master and as discussed on IRC
> it would probably be a good idea to startup a discussion and make sure
> there aren't any objections or clarifications not yet voiced.
>
> The patch has no BC because the third argument is optional and defaults to
> false. Personally, I have always thought it would be a good idea to be able
> to get the keys into the array_filter callback since I've stumbled across a
> few scenarios where that would have made things easier.
>
> I'm not sure if there are any particular down sides to this option being
> added, but none that I can find. It currently passes all tests in master
> and works as expected.
>
> Thoughts, opinions, objections, concerns?
>
>
It might be considered a BC break, but I really think we should drop the
boolean argument; just have it pass the key as parameter 2 always.


Thread (39 messages)

« previous php.internals (#67717) next »