3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $values = array(-5,2,3,-8,4,-1,0); array_walk($values, "abs"); function myAbs(&$val){ $val = abs($val); } array_walk($values, "myAbs");
based on qto2V
Output for 5.3.0 - 7.2.0
Warning: abs() expects exactly 1 parameter, 2 given in /in/5rujV on line 4 Warning: abs() expects exactly 1 parameter, 2 given in /in/5rujV on line 4 Warning: abs() expects exactly 1 parameter, 2 given in /in/5rujV on line 4 Warning: abs() expects exactly 1 parameter, 2 given in /in/5rujV on line 4 Warning: abs() expects exactly 1 parameter, 2 given in /in/5rujV on line 4 Warning: abs() expects exactly 1 parameter, 2 given in /in/5rujV on line 4 Warning: abs() expects exactly 1 parameter, 2 given in /in/5rujV on line 4
Output for 4.3.0 - 5.2.17
Warning: Wrong parameter count for abs() in /in/5rujV on line 4 Warning: Wrong parameter count for abs() in /in/5rujV on line 4 Warning: Wrong parameter count for abs() in /in/5rujV on line 4 Warning: Wrong parameter count for abs() in /in/5rujV on line 4 Warning: Wrong parameter count for abs() in /in/5rujV on line 4 Warning: Wrong parameter count for abs() in /in/5rujV on line 4 Warning: Wrong parameter count for abs() in /in/5rujV on line 4