3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function test($arr) { return iterator_to_array( new RecursiveIteratorIterator( new RecursiveArrayIterator($arr) ) ); } var_dump([1,2,3,4,[5,6,[7],8]]); var_dump([new stdClass, new stdClass);
Output for 5.4.0 - 5.4.19
Parse error: syntax error, unexpected ')', expecting ']' in /in/fEBP3 on line 12
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected '[', expecting ')' in /in/fEBP3 on line 11
Process exited with code 255.