Re: PR 287 - added use_keys argument to array_filter() [Discussion]
| From: | Sherif Ramadan | Date: | Thu, 26 Sep 2013 23:11:52 +0000 |
| Subject: | Re: PR 287 - added use_keys argument to array_filter() [Discussion] | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-69363@lists.php.net to get a copy of this message | ||
On Thu, Sep 26, 2013 at 6:51 PM, Tjerk Meesters <tjerk.meesters@gmail.com>wrote:
>
>
> I deliberately chose these values so that I can simply specify
>
true to
> mean pass both values. Bit masks seem cumbersome in this situation.
>
>
The default behavior is already to pass the value to the callback.
Requiring the argument only breaks backwards compatibility here. There is
no need for introducing 3 new constants. Simply use PASS_KEY or PASS_BOTH
to solve this problem with the default behavior is pass value if the
argument is omitted.