3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arr = array ( 0 => array ( 10 => 1, 12 => 2 ) ); var_dump(current($arr[10])); ?>
Output for 7.0.0 - 7.1.0
Notice: Undefined offset: 10 in /in/C51RB on line 9 Warning: current() expects parameter 1 to be array, null given in /in/C51RB on line 9 NULL
Output for 5.3.0 - 5.6.28
Warning: current() expects parameter 1 to be array, null given in /in/C51RB on line 9 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/C51RB on line 9 bool(false)
Output for 4.4.1
Notice: Undefined offset: 10 in /in/C51RB on line 9 Warning: current(): Passed variable is not an array or object in /in/C51RB on line 9 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/C51RB on line 9 bool(false)