3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php abstract class Foo { } class FooExtended extends Foo { } abstract class AbstractTest { abstract function test(); } class TestImpl extends AbstractTest { function test() : FooExtended { return new FooExtended(); } } $t = new TestImpl();
based on UsYZS
Output for hhvm-3.15.4, 7.0.0 - 7.3.0alpha1
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/GoH1S on line 21
Process exited with code 255.