On Sun, March 18, 2007 6:41 pm, Wez Furlong wrote:
> We've been daydreaming about the ability to do something like this in
> PHP:
>
> $data = array("zoo", "orange", "car", "lemon", "apple");
> usort($data, function($a, $b) { return strcmp($a, $b); });
> var_dump($data); # data is sorted alphabetically

I'd LOVE it if there was SOME difference between this and a normal
'function' definition...

I guess we're kind of stuck with 'create_function' being the mess that
it is.

But perhaps something like 'temp_function' or 'local_function' or 
'lexical_closure' or something similar.  Even 'horse' [*] would be
fine by me.

I think it muddies things too much to have it just be 'function' with
no name after it.

+1

* [sings] "In the desert, on a horse with no name"

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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

Reply via email to