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.0
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 5.3.20 - 5.6.21
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/ve8nu on line 5
Process exited with code 255.