3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A{} function f(): ?\A { return new A; } f();
based on DuBfB
Output for hhvm-3.21.3 - 3.22.0, 7.1.0 - 7.3.0beta1
Output for 7.0.30 - 7.0.31
Parse error: syntax error, unexpected '?' in /in/oiKhr on line 5
Process exited with code 255.
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/oiKhr:5 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.30
Parse error: syntax error, unexpected ':', expecting '{' in /in/oiKhr on line 5
Process exited with code 255.