3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function nice() { return ['nice','toll']; } $test = nice()[1] print_r($test);
Output for 5.4.0 - 5.4.17
Parse error: syntax error, unexpected 'print_r' (T_STRING) in /in/GAgTK on line 9
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected '[' in /in/GAgTK on line 4
Process exited with code 255.