3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $fnc = function (int $num): array { return [$num]; }; var_dump($fun(1));
Output for 7.0.0 - 7.3.0rc3
Notice: Undefined variable: fun in /in/lb2cr on line 7 Fatal error: Uncaught Error: Function name must be a string in /in/lb2cr:7 Stack trace: #0 {main} thrown in /in/lb2cr on line 7
Process exited with code 255.
Output for hhvm-3.15.4
Notice: Undefined variable: fun in /in/lb2cr on line 7 Fatal error: Uncaught Error: Function name must be a string in /in/lb2cr:7 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected ':', expecting '{' in /in/lb2cr on line 3
Process exited with code 255.