3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function getArray() { return ['a', 'b', 'c']; } function getarray() { return ['i', 'k', 'l']; } echo getArray()[0];
Output for 5.4.0 - 5.4.28
Fatal error: Cannot redeclare getarray() (previously declared in /in/vGbGf:4) in /in/vGbGf on line 9
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected '[' in /in/vGbGf on line 4
Process exited with code 255.