Stuff
public text v1 · immutableclass Base {}
class Ext extends Base {}
$o = new Base();
$eo = new Ext($o); # build the new object based on $o, /somehow/
* * * * * * * * * * * * * * * * * * * *
class Base {
public $x;
public function __construct($x) {
$this->x = $x;
}
}
class Ext extends Base {
public function __construct(Base $b) {
parent::__construct($b->x);
}
}