3v4l.org

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