Hi Rowan,

On Sun, Mar 8, 2015 at 3:35 AM, Rowan Collins <rowan.coll...@gmail.com>
wrote:

> On 06/03/2015 23:03, Yasuo Ohgaki wrote:
>
>> We have a lot of array_u*() functions such as
>>
>> http://php.net/manual/en/function.array-uintersect-uassoc.php
>> array array_uintersect_uassoc ( array $array1 , array $array2 [, array
>> $...
>> ], callable $value_compare_func , callable $key_compare_func )
>> this can be consolidated to
>> http://php.net/manual/en/function.array-intersect-assoc.php
>> array array_intersect_assoc ( array $array1 , array $array2 [, array $...
>> ]
>> )
>>
>> All of these has callback the end of parameters. These may be
>> consolidated.
>> I'll add this to the RFC if this is preferred.
>>
>
> Those functions both take any number of arguments, so given a function
> call with 4 arguments, you can't know if that's 4 arrays, or 2 arrays and 2
> callbacks. Don't forget that array($class_name, $method_name) is a valid
> callback, so you can't judge it by the type of the arguments either.


Thank you for heads up. If I detect array($class_name, $method_name) as
callback, there could
be unintended callback calls.

Since we have been deprecated similar
call_user_method()/call_user_method_array(), we may
deprecate array callbacks for u* functions, then consolidate in the future,
perhaps PHP8.
I don't mind add this to the RFC.

Regards,

--
Yasuo Ohgaki
yohg...@ohgaki.net

Reply via email to