Re: Re: PATCH: anonymous functions in PHP
| From: | Antony Dovgal | Date: | Thu, 20 Dec 2007 07:58:05 +0000 |
| Subject: | Re: Re: PATCH: anonymous functions in PHP | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-34118@lists.php.net to get a copy of this message | ||
On 20.12.2007 09:57, Alexey Zakhlestin wrote:
> being able to do the following (and not to worry about runtime
> compilation) is a good reason on it's own:
>
> array_filter($my_data, function($test){ return 3 === ($test % 4) });
Oh, my..
This code clearly demonstrates why a syntax like this should not be allowed. Ever.
--
Wbr,
Antony Dovgal