class test {
function test() {
echo "class test Constructor <br />";
}
}
class child1 extends test {
function child1() {
echo "class child1 parent: " . get_parent_class($this) . "<br />";
}
}
class child2 extends test {
function child2() {
echo "class child2 parent: " . get_parent_class($this) . "<br />";
}
}
$c1 = new child1();
$c2 = new child2();
/*
run:
class child1 parent: test
class child2 parent: test
*/