<?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();
You have javascript disabled. You will not be able to edit any code.