Let's say I have a class like:
class father {
function __construct() {
$msg = "Blah...\n";
print $msg;
}
function doSomething() {
$msg = get_class($this) . " does something...\n";
print $msg;
}
}
And a child class like:
class child extends father {
function __construct() {
$this->doSomething()
}
}
And:
class eldest extends father {
function __construct() {
$this->doSomething()
}
}
Is there a way to return an array of the present instances of the children of the father class (child and eldest in this case)?