3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class test{ public static function hello():void { } } test::hello();
Output for hhvm-3.21.0 - 3.22.0, 7.1.0 - 7.2.11
Output for 7.0.0 - 7.0.31
Fatal error: Uncaught TypeError: Return value of test::hello() must be an instance of void, none returned in /in/m68cP:6 Stack trace: #0 /in/m68cP(9): test::hello() #1 {main} thrown in /in/m68cP on line 6
Process exited with code 255.
Output for hhvm-3.11.1 - 3.20.2
Fatal error: Uncaught TypeError: Value returned from method test::hello() must be of type void, null given in /in/m68cP:6 Stack trace: #0 /in/m68cP(9): test::hello() #1 {main}
Process exited with code 255.
Output for hhvm-3.10.1
Fatal error: Syntax only allowed in Hack files (<?hh) or with -v Eval.EnableHipHopSyntax=true in /in/m68cP on line 4
Process exited with code 255.
Output for 5.3.18 - 5.6.38
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/m68cP on line 4
Process exited with code 255.