<?php class X{ public $prop = 42; function test(){ return new static('anything you want to pass to a constructor which is not here because I am lazy'); } } $x = new X(); var_dump($x->test());
You have javascript disabled. You will not be able to edit any code.