3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a=array('a','b',' a'); array_walk($a, create_function('&$val', '$val = trim($val);')); print_r($a);
based on MTWgl
Output for 7.2.0 - 7.3.0beta1
Deprecated: Function create_function() is deprecated in /in/fuaS7 on line 3 Array ( [0] => a [1] => b [2] => a )
Output for 4.3.0 - 7.1.20
Array ( [0] => a [1] => b [2] => a )