3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = array(1, 2); $it = new ArrayIterator($array); $it->append(3); var_dump($array);
Output for 5.2.4 - 7.2.0
array(2) { [0]=> int(1) [1]=> int(2) }
Output for 5.0.0 - 5.2.3
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3) }
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: arrayiterator in /in/BrlSZ on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: arrayiterator in /in/BrlSZ on line 5