Re: Constructor object instance dereferentiation
| From: | Felipe Pena | Date: | Mon, 23 May 2011 01:23:47 +0000 |
| Subject: | Re: Constructor object instance dereferentiation | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-52502@lists.php.net to get a copy of this message | ||
Hi,
2011/5/22 Matthew Weier O'Phinney <weierophinney@php.net>
> One thing not on the RFC that I'm curious about: if the class defines
> __invoke(), would the following work?
>
> new MyClass()();
>
> That would be particularly useful for implementing helper systems, which
> are quite often one-off use cases.
>
>
No, such feature was not planned in the RFC, the patch doesn't change the
grammar to allow it.
--
Regards,
Felipe Pena