Re: [RFC] Closure::call and Function Referencing as Closures
| From: | Marco Pivetta | Date: | Tue, 05 Aug 2014 16:08:16 +0000 |
| Subject: | Re: [RFC] Closure::call and Function Referencing as Closures | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-76360@lists.php.net to get a copy of this message | ||
On 5 August 2014 18:01, Ralph Schindler <ralph@ralphschindler.com> wrote:
> 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
>
Interestingly, reflection doesn't even expose it: http://3v4l.org/8Jutn
Marco Pivetta
http://twitter.com/Ocramius
http://ocramius.github.com/