Re: Closures as methods (and Closure::bind)
| From: | Johannes Schlüter | Date: | Wed, 11 Aug 2010 14:37:01 +0000 |
| Subject: | Re: Closures as methods (and Closure::bind) | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-49338@lists.php.net to get a copy of this message | ||
On Wed, 2010-08-11 at 15:29 +0100, Gustavo Lopes wrote:
>
> > * What about allowing properties with function names as
> strings or
> > array($obj_or_class, 'method'), won't that be needed for
> being
> > consistent with local variables?
>
> Well, you cannot do "$a = 'phpinfo'; $a();" as well, so it's
> consistent with that. I think what you refer to would only make sense
> if that were allowed.
You can. This is valid.
johannes