<?php class A { public function current() { return 5; } } class B {} class C extends A { public function current(): B { return new B(); } } $o = new C; var_dump($o->current());
You have javascript disabled. You will not be able to edit any code.