3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$foo()() //class foo { static function bar(){ return 'bar'; }} function bar() { echo 'bazz'; } $foo = 'foo'; echo (function foo() { return array(1,2,3);})[0]; //echo $foo()[0];
Output for 5.4.0 - 5.4.45, 5.5.24 - 5.5.30, 5.6.7 - 5.6.14
Parse error: syntax error, unexpected 'foo' (T_STRING), expecting '(' in /in/fT7ID on line 6
Process exited with code 255.

preferences:
184.8 ms | 1395 KiB | 67 Q