3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function test(): derp { } test();
based on OtqM2
Output for 7.0.0 - 7.1.7, 7.2.0
Fatal error: Uncaught TypeError: Return value of test() must be an instance of derp, none returned in /in/MpUP6:4 Stack trace: #0 /in/MpUP6(6): test() #1 {main} thrown in /in/MpUP6 on line 4
Process exited with code 255.
Output for 7.1.10

Process exited with code 137.
Output for 5.3.19 - 5.6.28
Parse error: syntax error, unexpected ':', expecting '{' in /in/MpUP6 on line 3
Process exited with code 255.