3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = array(); $first = reset($array); var_dump($first); $array = null; $first = reset($array); var_dump($first);
Output for 5.3.0 - 7.2.0
bool(false) Warning: reset() expects parameter 1 to be array, null given in /in/ZG8nV on line 7 NULL
Output for 4.3.2 - 5.2.17
bool(false) Warning: reset(): Passed variable is not an array or object in /in/ZG8nV on line 7 bool(false)
Output for 4.3.0 - 4.3.1
bool(false) Warning: reset() [http://www.php.net/function.reset]: Passed variable is not an array or object in /in/ZG8nV on line 7 bool(false)