>> You mentioned ability to explicitly specify binding as a possible extension.
>> However
>>
>>     [$var1, $var2]()
>>
>> is not necessarily failing right now, it may be a valid array callable.
>>
>> Nikita
>
> As already mentioned we must maintain a leading `=` or `&`:
>
>   [=, $var1, $var2]()
>   [=, $var1, $var2]()
>
> Sorry if that was unclear.

Oops, forgot to change the bottom line:

   [=, $var1, $var2]()
   [&, $var1, $var2]()

The first line means "bind any implicit usages of variables by value,
and also bind $var1 and $var2 by value".
The second line means "bind any implicit usages of variables by
reference, and bind $var1 and $var2 by value".

This exists in C++ but C++ allows you to drop the leading `=` or `&`.
We cannot, for precisely the reason you mentioned.

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to