3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { public function test() { return "abc"; } } class B extends A { public function test() : string { return parent::test(); } } $b = new B(); echo $b->test();
Output for 7.0.0 - 7.2.0
abc
Output for 5.3.21 - 5.6.28
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/Okgtf on line 13
Process exited with code 255.