3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function show ($a): void { echo $a; } show("Eu");
Output for 7.1.0 - 7.2.6
Eu
Output for 7.0.0 - 7.0.20
Eu Fatal error: Uncaught TypeError: Return value of show() must be an instance of void, none returned in /in/WHoCQ:5 Stack trace: #0 /in/WHoCQ(7): show('Eu') #1 {main} thrown in /in/WHoCQ on line 5
Process exited with code 255.
Output for hhvm-3.15.4
Eu Fatal error: Uncaught TypeError: Value returned from function show() must be of type void, null given in /in/WHoCQ:5 Stack trace: #0 /in/WHoCQ(7): show() #1 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected ':', expecting '{' in /in/WHoCQ on line 3
Process exited with code 255.