3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(current($undefined));
Output for 7.0.0 - 7.3.1
Notice: Undefined variable: undefined in /in/l0XK4 on line 2 Warning: current() expects parameter 1 to be array, null given in /in/l0XK4 on line 2 NULL
Output for hhvm-3.10.1 - 3.17.3
Warning: Invalid operand type was used: expecting an array in /in/l0XK4 on line 2 bool(false)
Output for 5.3.0 - 5.6.38
Warning: current() expects parameter 1 to be array, null given in /in/l0XK4 on line 2 NULL
Output for 4.3.2 - 4.4.0, 4.4.2 - 5.2.17
Warning: current(): Passed variable is not an array or object in /in/l0XK4 on line 2 bool(false)
Output for 4.4.1
Notice: Undefined variable: undefined in /in/l0XK4 on line 2 Warning: current(): Passed variable is not an array or object in /in/l0XK4 on line 2 bool(false)
Output for 4.3.0 - 4.3.1
Warning: current() [http://www.php.net/function.current]: Passed variable is not an array or object in /in/l0XK4 on line 2 bool(false)