3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array( 'filters'=> array('where'=>array('yr'=>1994))); $keys = array_keys($array['filters']['where']); echo array_shift(var_dump(array_keys($array['filters']['where'])));
based on osGnF
Output for 7.0.0 - 7.1.0
array(1) { [0]=> string(2) "yr" } Notice: Only variables should be passed by reference in /in/tLLeK on line 4 Warning: array_shift() expects parameter 1 to be array, null given in /in/tLLeK on line 4
Output for 5.3.0 - 5.6.28
array(1) { [0]=> string(2) "yr" } Strict Standards: Only variables should be passed by reference in /in/tLLeK on line 4 Warning: array_shift() expects parameter 1 to be array, null given in /in/tLLeK on line 4
Output for 5.1.0 - 5.2.17
array(1) { [0]=> string(2) "yr" } Strict Standards: Only variables should be passed by reference in /in/tLLeK on line 4 Warning: array_shift(): The argument should be an array in /in/tLLeK on line 4
Output for 5.0.5
array(1) { [0]=> string(2) "yr" } Fatal error: Only variables can be passed by reference in /in/tLLeK on line 4
Process exited with code 255.
Output for 4.3.2 - 5.0.4
array(1) { [0]=> string(2) "yr" } Warning: array_shift(): The argument should be an array in /in/tLLeK on line 4
Output for 4.3.0 - 4.3.1
array(1) { [0]=> string(2) "yr" } Warning: array_shift() [http://www.php.net/function.array-shift]: The argument should be an array in /in/tLLeK on line 4