Re: Re: PATCH: anonymous functions in PHP

From: Date: Thu, 20 Dec 2007 20:02:11 +0000
Subject: Re: Re: PATCH: anonymous functions in PHP
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-34176@lists.php.net to get a copy of this message
Anthony, It may be disagreeable from your perspective, but I (and many others) find this to be a very useful construct. And I hate to invoke "other languages" argument, but there is a reason that something like this is available in many modern languages - it is useful. -Andrei Antony Dovgal wrote:
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.


« previous php.internals (#34176) next »