3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // Parse error: syntax error, unexpected '[' in Command line code on line 1 // dammit [ 1 => function ($a) { echo $a; } ][1]('foo'); // Parse error: syntax error, unexpected '[' in Command line code on line 1 // sonofabitch [ 1 => function ($a) { echo $a; } ][1]; // ok... ok... here we go function n($o) { return $o; } n([ 1 => function ($a) { echo $a; } ])[1]; // Parse error: syntax error, unexpected '(' in Command line code on line 1 // AW COMEON!! function n($o) { return $o; } n([ 1 => function ($a) { echo $a; } ])[1]('foo');
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.3.0 - 5.4.15
Parse error: syntax error, unexpected '[' in /in/FEVeu on line 5
Process exited with code 255.