is it possible to assign the $this object to a new instance of a class that extends the $this base class?? ( in php of course )
class base {
function a() {
// do some stuff here
$extended = new extending();
$this = $extended;
$this->extended_functionality();
}
}
class extending {
function extended_functionality() {
// do some more! stuff here
}
}
In Short… No.
$thisis a read-only keyword that represents the current instantiated object.Just create the object you mean to in the first place.