3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php iterator_to_array(new LimitIterator(new ArrayIterator(array(1, 2, 3)), 10));
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught OutOfBoundsException: Seek position 10 is out of range in /in/VHC6N:3 Stack trace: #0 [internal function]: ArrayIterator->seek(10) #1 [internal function]: LimitIterator->rewind() #2 /in/VHC6N(3): iterator_to_array(Object(LimitIterator)) #3 {main} thrown in /in/VHC6N on line 3
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
Fatal error: Uncaught exception 'OutOfBoundsException' with message 'Seek position 10 is out of range' in /in/VHC6N:3 Stack trace: #0 /in/VHC6N(3): LimitIterator->rewind() #1 {main}
Process exited with code 255.
Output for 5.1.5 - 5.6.28
Fatal error: Uncaught exception 'OutOfBoundsException' with message 'Seek position 10 is out of range' in /in/VHC6N:3 Stack trace: #0 [internal function]: ArrayIterator->seek(10) #1 [internal function]: LimitIterator->rewind() #2 /in/VHC6N(3): iterator_to_array(Object(LimitIterator)) #3 {main} thrown in /in/VHC6N on line 3
Process exited with code 255.
Output for 5.1.0 - 5.1.4
Fatal error: Couldn't execute method LimitIterator::valid in Unknown on line 0
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Fatal error: Call to undefined function iterator_to_array() in /in/VHC6N on line 3
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: iterator_to_array() in /in/VHC6N on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: iterator_to_array() in /in/VHC6N on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: iterator_to_array() in /in/VHC6N on line 3