PHP 5.3 lambda anonymous function not working -
i can't figure out what's wrong here. here's test.php file:
<?php error_reporting(e_all); echo phpversion(); $arr = array (); $attrs = array_filter((array)$arr, function($v) { return ($v || $v === 0 || $v === '0'); });
the output of script is:
5.3.3 warning: array_filter() expects parameter 2 valid callback, no array or string given in /path/test.php on line 8
how can be? thought php 5.3 supported lambdas.
this related bug in eaccelerator, had problem caching opcode used lambdas. updated latest version of eaccelerator , fixed.
Comments
Post a Comment