array_walk bug?

49 views
Skip to first unread message

pykhmer

unread,
Apr 6, 2011, 10:14:43 AM4/6/11
to phpsh
php> $names = array("D\'Artagnan", "Aramis", "Portos");
php> =array_walk($name,function(&$n){$n = stripslashes ($n);});

Parse error: syntax error, unexpected T_FUNCTION in /home/dev2/
Documents/phpsh/phpsh.php(230) : eval()'d code on line 1

php>

Aran Donohue

unread,
Apr 6, 2011, 5:49:04 PM4/6/11
to ph...@googlegroups.com
Anonymous functions are a 5.3 feature. It's not a bug in array_walk. If phpsh is incorrectly using the wrong php, that might be considered a bug.

Aran

Reply all
Reply to author
Forward
0 new messages