3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function should_return_nothing(): void { return; } $x = should_return_nothing(); var_dump($x);
based on VNrCh
Output for 7.1.0 - 7.2.0
NULL
Output for 7.0.0 - 7.0.20
Fatal error: Uncaught TypeError: Return value of should_return_nothing() must be an instance of void, none returned in /in/jB1e8:4 Stack trace: #0 /in/jB1e8(7): should_return_nothing() #1 {main} thrown in /in/jB1e8 on line 4
Process exited with code 255.
Output for 5.5.0 - 5.6.28
Parse error: syntax error, unexpected ':', expecting '{' in /in/jB1e8 on line 3
Process exited with code 255.