3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface A { static function make(): A; } class B implements A { static function make(): B { return new B(); } }
based on eP1i2
Output for 7.0.0 - 7.2.6
Fatal error: Declaration of B::make(): B must be compatible with A::make(): A in /in/b2gMm on line 6
Process exited with code 255.
Output for 5.3.19 - 5.6.28
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/b2gMm on line 4
Process exited with code 255.