<?php class A { public static function f() { $obj = new static; return $obj; } } class B extends A {} var_dump(A::f()); var_dump(B::f());
You have javascript disabled. You will not be able to edit any code.