3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class test{ public static function hello():void { } } test::hello();
Output for 7.1.0 - 7.2.0
Output for 7.0.0 - 7.0.20
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 5.3.18 - 5.6.28
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/m68cP on line 4
Process exited with code 255.