<?php class Foo { public static function make() { return new static(); } } class ChildOfFoo extends Foo { public function __construct($a) { $this->a = $a;} } $b = ChildOfFoo::make(); var_dump($b);
You have javascript disabled. You will not be able to edit any code.