3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array('orange', 'blue', 'gray'); $s = reset($a); print_r($s); print_r($a); $a = array(); $s = reset($a); print_r($s); print_r($a);
Output for 4.3.0 - 7.2.0
orangeArray ( [0] => orange [1] => blue [2] => gray ) Array ( )