3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $firstKey = array_keys($array)[0];
Output for 5.4.10 - 7.2.0
Notice: Undefined variable: array in /in/fO171 on line 3 Warning: array_keys() expects parameter 1 to be array, null given in /in/fO171 on line 3
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/fO171 on line 3
Process exited with code 255.