Adam,

On 12/8/12 4:48 PM, Adam Jon Richardson wrote:
call closures that are stored as object properties directly without having
to make use of a temporary variable.
...
$o = new stdClass();
$o->func = function(){
     return 'Yes!';
};
$o->func();

The following expression avoids PHP's dilemma of distinguishing prop/method, but fails because you can't execute an expression:

($o->func)();

Similarly if $a is a Closure, $a() works but ($a)() fails.

If these could be made to work, would it break BC? And *should* they be made to 
work?

Steve Clay
--
http://www.mrclay.org/

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

Reply via email to