3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array(1,2,array(3,4, array(5,6,7), 8), 9); $it = new RecursiveIteratorIterator(new RecursiveArrayIterator($a)); foreach($it as $v) { echo $v, " "; }
Output for 5.1.0 - 5.6.30, hhvm-3.10.1 - 3.22.0, 7.0.0 - 7.2.1
1 2 3 4 5 6 7 8 9
Output for 5.0.0 - 5.0.5
Fatal error: Class 'RecursiveArrayIterator' not found in /in/KaQDO on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: recursiveiteratoriterator in /in/KaQDO on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: recursiveiteratoriterator in /in/KaQDO on line 4