3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // $i = new CachingIterator(20); new RecursiveCachingIterator(new ArrayIterator(array()));
based on he82A
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught TypeError: RecursiveCachingIterator::__construct() expects parameter 1 to be RecursiveIterator, object given in /in/VYJb0:5 Stack trace: #0 /in/VYJb0(5): RecursiveCachingIterator->__construct(Object(ArrayIterator)) #1 {main} thrown in /in/VYJb0 on line 5
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
Fatal error: Uncaught exception 'InvalidArgumentException' with message 'RecursiveCachingIterator::__construct() expects parameter 1 to be RecursiveIterator, object given' in /in/VYJb0:5 Stack trace: #0 /in/VYJb0(5): RecursiveCachingIterator->__construct() #1 {main}
Process exited with code 255.
Output for 5.1.0 - 5.6.28
Fatal error: Uncaught exception 'InvalidArgumentException' with message 'RecursiveCachingIterator::__construct() expects parameter 1 to be RecursiveIterator, object given' in /in/VYJb0:5 Stack trace: #0 /in/VYJb0(5): RecursiveCachingIterator->__construct(Object(ArrayIterator)) #1 {main} thrown in /in/VYJb0 on line 5
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Fatal error: Class 'RecursiveCachingIterator' not found in /in/VYJb0 on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: recursivecachingiterator in /in/VYJb0 on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: recursivecachingiterator in /in/VYJb0 on line 5