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

From: Date: Thu, 26 Sep 2013 23:33:18 +0000
Subject: Re: PR 287 - added use_keys argument to array_filter() [Discussion]
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On Fri, Sep 27, 2013 at 7:11 AM, Sherif Ramadan <[email protected]>wrote:

>
>
>
> On Thu, Sep 26, 2013 at 6:51 PM, Tjerk Meesters <[email protected]>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.
>

I agree that only two constants are necessary here to accomplish the same
effect; I'll update the code.

I didn't quite understand how the current implementation would have BC
issues, though. Would you care to elaborate on that?


Thread (39 messages)

« previous php.internals (#69364) next »