3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $i = new CachingIterator(20); // new RecursiveCachingIterator(new ArrayIterator(array()));
based on VYJb0
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/3pHca:3 Stack trace: #0 /in/3pHca(3): CachingIterator->__construct(20) #1 {main} thrown in /in/3pHca 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/3pHca on line 3
Process exited with code 255.
Output for 5.1.1 - 5.1.6
Fatal error: Argument 1 passed to CachingIterator::__construct() must be an object of class Iterator in /in/3pHca on line 3
Process exited with code 255.
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/3pHca on line 5
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/3pHca 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/3pHca 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/3pHca 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/3pHca on line 3