3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php new CachingIterator(new ArrayIterator([]), 3);
based on JaJcu
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught InvalidArgumentException: Flags must contain only one of CALL_TOSTRING, TOSTRING_USE_KEY, TOSTRING_USE_CURRENT, TOSTRING_USE_INNER in /in/a4r5W:2 Stack trace: #0 /in/a4r5W(2): CachingIterator->__construct(Object(ArrayIterator), 3) #1 {main} thrown in /in/a4r5W on line 2
Process exited with code 255.
Output for 5.5.24 - 5.6.28
Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Flags must contain only one of CALL_TOSTRING, TOSTRING_USE_KEY, TOSTRING_USE_CURRENT, TOSTRING_USE_INNER' in /in/a4r5W:2 Stack trace: #0 /in/a4r5W(2): CachingIterator->__construct(Object(ArrayIterator), 3) #1 {main} thrown in /in/a4r5W on line 2
Process exited with code 255.
Output for 5.4.0 - 5.4.45
Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Flags must contain only one of CALL_TOSTRING, TOSTRING_USE_KEY, TOSTRING_USE_CURRENT, TOSTRING_USE_CURRENT' in /in/a4r5W:2 Stack trace: #0 /in/a4r5W(2): CachingIterator->__construct(Object(ArrayIterator), 3) #1 {main} thrown in /in/a4r5W on line 2
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ')' in /in/a4r5W on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[', expecting ')' in /in/a4r5W on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `')'' in /in/a4r5W on line 2
Process exited with code 255.