3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $queue = new ArrayIterator(array('adasdasd')); reset($queue); $current = current($queue); var_dump($current);
based on G6g00
Output for 5.0.0 - 5.6.30, 7.0.0 - 7.3.0beta1
string(8) "adasdasd"
Output for hhvm-3.22.0
Warning: Invalid operand type was used: expecting an array in /in/VjCHR on line -1 Warning: Invalid operand type was used: expecting an array in /in/VjCHR on line -1 bool(false)
Output for hhvm-3.10.1 - 3.21.3
Warning: Invalid operand type was used: expecting an array in /in/VjCHR on line 4 Warning: Invalid operand type was used: expecting an array in /in/VjCHR on line 5 bool(false)
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: arrayiterator in /in/VjCHR on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: arrayiterator in /in/VjCHR on line 3