3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array('1/', '2/', '3/'); array_walk($array, 'trim', '/'); var_dump($array);
based on M4deA
Output for 5.3.0 - 7.1.0
Warning: trim() expects at most 2 parameters, 3 given in /in/1HE3d on line 4 Warning: trim() expects at most 2 parameters, 3 given in /in/1HE3d on line 4 Warning: trim() expects at most 2 parameters, 3 given in /in/1HE3d on line 4 array(3) { [0]=> string(2) "1/" [1]=> string(2) "2/" [2]=> string(2) "3/" }
Output for 4.3.0 - 5.2.17
Warning: Wrong parameter count for trim() in /in/1HE3d on line 4 Warning: Wrong parameter count for trim() in /in/1HE3d on line 4 Warning: Wrong parameter count for trim() in /in/1HE3d on line 4 array(3) { [0]=> string(2) "1/" [1]=> string(2) "2/" [2]=> string(2) "3/" }