3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x = null; var_dump($x, current($x), current(current($x)));
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.2.6
Warning: current() expects parameter 1 to be array, null given in /in/hYXfc on line 5 Warning: current() expects parameter 1 to be array, null given in /in/hYXfc on line 5 Warning: current() expects parameter 1 to be array, null given in /in/hYXfc on line 5 NULL NULL NULL
Output for hhvm-3.15.4
Warning: Invalid operand type was used: expecting an array in /in/hYXfc on line 5 Warning: Invalid operand type was used: expecting an array in /in/hYXfc on line 5 Warning: Invalid operand type was used: expecting an array in /in/hYXfc on line 5 NULL bool(false) bool(false)