3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface foo { function bar() : self; } class A implements foo { function bar() : self { } }
Output for 7.0.0 - 7.2.12
Fatal error: Declaration of A::bar(): A must be compatible with foo::bar(): foo in /in/ve8nu on line 9
Process exited with code 255.
Output for hhvm-3.11.1 - 3.22.0
Output for hhvm-3.10.1
Fatal error: Syntax only allowed in Hack files (<?hh) or with -v Eval.EnableHipHopSyntax=true in /in/ve8nu on line 5
Process exited with code 255.
Output for 5.3.20 - 5.6.38
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/ve8nu on line 5
Process exited with code 255.