3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $ao = new ArrayObject([2, 3, 8, 9]); var_dump(array_walk_recursive($ao->getArrayCopy(), function($item, $key){ echo $key . ' => ' . $item . PHP_EOL; }));
based on 16eku
Output for 7.0.0 - 7.2.0
Notice: Only variables should be passed by reference in /in/cqgNj on line 5 0 => 2 1 => 3 2 => 8 3 => 9 bool(true)
Output for 5.4.12 - 5.6.28
Strict Standards: Only variables should be passed by reference in /in/cqgNj on line 5 0 => 2 1 => 3 2 => 8 3 => 9 bool(true)
Output for 5.3.22 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ')' in /in/cqgNj on line 3
Process exited with code 255.