At the risk of stating the obvious, can’t you just use $f->bar->__invoke()?

Actually, it was not immediately obvious that __invoke() was a method from the docs as it is a side-note and not in the class signature breakout. Oops! ;)

http://php.net/manual/en/class.closure.php

That said, call() would be more of a "first-class method" in the Closure class API, as opposed to __invoke() which is largely relegated as a "magic" method.

But you have a solid point on that.

-ralph

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

Reply via email to