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