3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function foo(): ?string { return; } foo();
Output for 7.1.0 - 7.2.4
Fatal error: A function with return type must return a value (did you mean "return null;" instead of "return;"?) in /in/ibp61 on line 5
Process exited with code 255.
Output for hhvm-3.21.3 - 3.22.0
Output for hhvm-3.18.5
Fatal error: Uncaught Error: Syntax only allowed in Hack files (<?hh) or with -v Eval.EnableHipHopSyntax=true in /in/ibp61:3 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected ':', expecting '{' in /in/ibp61 on line 3
Process exited with code 255.