<?php
$values = array(-5,2,3,-8,4,-1,0);
array_walk($values, "abs");
?>
=> Warning: abs() expects exactly 1 parameter, 2 given in ...
###### Then I wrote this function :
<?php
function myAbs(&$val){
$val = abs($val);
}
array_walk($values, "myAbs");
Warning: abs() expects exactly 1 parameter, 2 given in /in/Wd7BC on line 4
Warning: abs() expects exactly 1 parameter, 2 given in /in/Wd7BC on line 4
Warning: abs() expects exactly 1 parameter, 2 given in /in/Wd7BC on line 4
Warning: abs() expects exactly 1 parameter, 2 given in /in/Wd7BC on line 4
Warning: abs() expects exactly 1 parameter, 2 given in /in/Wd7BC on line 4
Warning: abs() expects exactly 1 parameter, 2 given in /in/Wd7BC on line 4
Warning: abs() expects exactly 1 parameter, 2 given in /in/Wd7BC on line 4
=> Warning: abs() expects exactly 1 parameter, 2 given in ...
###### Then I wrote this function :
Warning: Wrong parameter count for abs() in /in/Wd7BC on line 4
Warning: Wrong parameter count for abs() in /in/Wd7BC on line 4
Warning: Wrong parameter count for abs() in /in/Wd7BC on line 4
Warning: Wrong parameter count for abs() in /in/Wd7BC on line 4
Warning: Wrong parameter count for abs() in /in/Wd7BC on line 4
Warning: Wrong parameter count for abs() in /in/Wd7BC on line 4
Warning: Wrong parameter count for abs() in /in/Wd7BC on line 4
=> Warning: abs() expects exactly 1 parameter, 2 given in ...
###### Then I wrote this function :