<?php class x { public $p = 3; function __construct() { $this->p = 4; } } //Cannot create Closure for new expression //$c = new X(...); $x = new x(); echo $x->p; $x->p = 5; echo $x->p; $f = $x->__construct(...); $f(); echo $x->p;
You have javascript disabled. You will not be able to edit any code.