3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = [ "parent" => [ "title" => null ] ]; var_dump(iterator_to_array(new RecursiveIteratorIterator(new ArrayIterator($array)), true));
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught InvalidArgumentException: An instance of RecursiveIterator or IteratorAggregate creating it is required in /in/TMrkC:9 Stack trace: #0 /in/TMrkC(9): RecursiveIteratorIterator->__construct(Object(ArrayIterator)) #1 {main} thrown in /in/TMrkC on line 9
Process exited with code 255.
Output for 5.4.10 - 5.6.28
Fatal error: Uncaught exception 'InvalidArgumentException' with message 'An instance of RecursiveIterator or IteratorAggregate creating it is required' in /in/TMrkC:9 Stack trace: #0 /in/TMrkC(9): RecursiveIteratorIterator->__construct(Object(ArrayIterator)) #1 {main} thrown in /in/TMrkC on line 9
Process exited with code 255.
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/TMrkC on line 3
Process exited with code 255.