Hello Ryusuke, generally I like both. But could you provide separate patches?
marcus Friday, December 28, 2007, 5:45:03 PM, you wrote: >>any idea about the possibility of hash conflict? > How about this patch? > http://www.opendogs.org/pub/php-5.3dev-071228a.patch > This patch is PHP 5.3 version of the patch I have introduced > in my blog. (written in Japanese) > 1. http://d.hatena.ne.jp/rsky/20071126/1196077860 > 2. http://d.hatena.ne.jp/rsky/20071128/1196260732 > 3. http://d.hatena.ne.jp/rsky/20071130/1196426672 > This patch contains two features, anonymous function and > square bracket array syntax. > Anonymous function can be used in loop (does not exhaust memory > as create_function() in loop), work with opcode caches > and also can be called directly like JavaScript's one. > For example: > % php -r 'print_r(array_map(function($n){ return $n * $n; }, [1, 2, 3]));' > Array > ( > [0] => 1 > [1] => 4 > [2] => 9 > ) > % php -r 'function($str){ echo $str, "\n"; }("foo");' > foo > More examples are included in this archive: > http://www.opendogs.org/pub/php-5.3dev-071228-anon-patch.zip > -- > /** > * Ryusuke SEKIYAMA > * [EMAIL PROTECTED] > */ Best regards, Marcus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php