3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = new ArrayObject(1,2,3,4,5); var_dump($a); echo $a->getIterator()->current(); $a->getIterator()->next(); $a->getIterator()->next(); echo $a->getIterator()->current();
based on SjeIU
Output for 7.1.0 - 7.2.0
Fatal error: Uncaught ArgumentCountError: ArrayObject::__construct() expects at most 3 parameters, 5 given in /in/bMmjd:4 Stack trace: #0 /in/bMmjd(4): ArrayObject->__construct(1, 2, 3, 4, 5) #1 {main} thrown in /in/bMmjd on line 4
Process exited with code 255.
Output for 7.0.0 - 7.0.20
Fatal error: Uncaught TypeError: ArrayObject::__construct() expects at most 3 parameters, 5 given in /in/bMmjd:4 Stack trace: #0 /in/bMmjd(4): ArrayObject->__construct(1, 2, 3, 4, 5) #1 {main} thrown in /in/bMmjd on line 4
Process exited with code 255.
Output for 5.3.21 - 5.6.28
Fatal error: Uncaught exception 'InvalidArgumentException' with message 'ArrayObject::__construct() expects at most 3 parameters, 5 given' in /in/bMmjd:4 Stack trace: #0 /in/bMmjd(4): ArrayObject->__construct(1, 2, 3, 4, 5) #1 {main} thrown in /in/bMmjd on line 4
Process exited with code 255.