<?php class Test { static public function getNew() { return new static; } } $obj1 = new Test(); $obj2 = new $obj1; var_dump($obj2);
You have javascript disabled. You will not be able to edit any code.