3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(iterator_to_array(['E' => 'tet', 'RER' => 'erer', 'roro'], true));
based on PUOeh
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught TypeError: Argument 1 passed to iterator_to_array() must implement interface Traversable, array given in /in/FtH7r:3 Stack trace: #0 /in/FtH7r(3): iterator_to_array(Array, true) #1 {main} thrown in /in/FtH7r on line 3
Process exited with code 255.
Output for 5.4.0 - 5.6.28
Catchable fatal error: Argument 1 passed to iterator_to_array() must implement interface Traversable, array given in /in/FtH7r on line 3
Process exited with code 255.