3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Test{ function test():array{ return 'dick'; } }
Output for 7.0.0 - 7.0.1
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Test has a deprecated constructor in /in/WXumV on line 3 Fatal error: Constructor Test::test() cannot declare a return type in /in/WXumV on line 3
Process exited with code 255.
Output for 5.3.21 - 5.6.16
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/WXumV on line 5
Process exited with code 255.