3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $i = new CachingIterator(20);
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught TypeError: Argument 1 passed to CachingIterator::__construct() must implement interface Iterator, integer given in /in/kJJvQ:3 Stack trace: #0 /in/kJJvQ(3): CachingIterator->__construct(20) #1 {main} thrown in /in/kJJvQ on line 3
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
Catchable fatal error: Argument 1 passed to CachingIterator::__construct() must implement interface Iterator, int given in /in/kJJvQ on line 3
Process exited with code 255.
Output for 5.2.0 - 5.6.28
Catchable fatal error: Argument 1 passed to CachingIterator::__construct() must implement interface Iterator, integer given in /in/kJJvQ on line 3
Process exited with code 255.
Output for 5.1.0 - 5.1.6
Fatal error: Argument 1 passed to CachingIterator::__construct() must be an object of class Iterator in /in/kJJvQ on line 3
Process exited with code 255.
Output for 5.0.1 - 5.0.5
Fatal error: Argument 1 must be an object of class Iterator in /in/kJJvQ on line 3 Fatal error: Unknown: The inner constructor wasn't initialized with an iterator instance in Unknown on line 0
Process exited with code 255.
Output for 5.0.0
Fatal error: Argument 1 must be an object of class Iterator in /in/kJJvQ on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: cachingiterator in /in/kJJvQ on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: cachingiterator in /in/kJJvQ on line 3