Re: [PATCH] [RFC] Closures and lambda functions in PHP
| From: | troels knak-nielsen | Date: | Mon, 30 Jun 2008 07:29:37 +0000 |
| Subject: | Re: [PATCH] [RFC] Closures and lambda functions in PHP | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-38684@lists.php.net to get a copy of this message | ||
On Mon, Jun 30, 2008 at 12:41 AM, Lars Strojny <lars@strojny.net> wrote:
> Hi Stas,
>
> Am Sonntag, den 29.06.2008, 15:20 -0700 schrieb Stanislav Malyshev:
> [...]
>> If we use this syntax, and $view->escape is not defined, should we
>> call __call or __get?
>
> That's indeed a good question. Calling __get() after resolving
> $view->escape as a property would break BC. Maybe we would do the
I really think, the only sane thing to do, is to invoke __call. Since
lambda's are first-class, it would make sense to get rid of __call
entirely, but as it's already there, I would say, that we should
preserve BC. With the current behaviour (invoke __call), it's still
possible to delegate to a lambda, from within the __call method.
--
troels