On 12/20/07, Stanislav Malyshev <[EMAIL PROTECTED]> 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) });
>
> What's wrong with regular functions?

I wrote in in thread, already, but here is the summary:

1) you need to declare them somewhere, which doesn't make much sense
if these functions are meant to be used only in such context.
Sometimes there are even problem to give meaningful names to such
functions
2) inline-function is a good candidate for automatic optimization (in
case of array_filter, array_map and similiar the construction can be
converted to the loop)
3) as the result of (1) and (2) it can be used for fast "currying" of
other functions

-- 
Alexey Zakhlestin
http://blog.milkfarmsoft.com/

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to