3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = new SplFixedArray(); $array[1] = 2; $array[4] = "foo"; foreach($array as $v) { var_dump($v); }
based on 11Hro
Output for 7.0.0 - 7.3.0beta1
Fatal error: Uncaught RuntimeException: Index invalid or out of range in /in/VTO32:5 Stack trace: #0 {main} thrown in /in/VTO32 on line 5
Process exited with code 255.
Output for 5.5.0 - 5.6.21
Fatal error: Uncaught exception 'RuntimeException' with message 'Index invalid or out of range' in /in/VTO32:5 Stack trace: #0 /in/VTO32(5): unknown() #1 {main} thrown in /in/VTO32 on line 5
Process exited with code 255.