3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = range(1,10,2); function change(&$value,$key,$factor){ $value = $value * $factor; } array_walk($array,'change',3); print_r($array); ?>
Output for 5.0.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [0] => 3 [1] => 9 [2] => 15 [3] => 21 [4] => 27 )
Output for 4.3.2 - 4.4.9
Warning: Wrong parameter count for range() in /in/E9CiB on line 3 Warning: array_walk(): The argument should be an array in /in/E9CiB on line 10
Output for 4.3.0 - 4.3.1
Warning: Wrong parameter count for range() in /in/E9CiB on line 3 Warning: array_walk() [http://www.php.net/function.array-walk]: The argument should be an array in /in/E9CiB on line 10