let I have a class named A. I have another two classes B and C. Both are extended from the class A. Now I want to get the name of the classes which is extended from class A i.e. B and C.
class A{
}
class B extends A{
}
class C extends A{
}
Now I want to get the name B and C.
I have tried using instanceof
$obj=new B();
if($obj instanceof A)
echo "derived";
but to do so I have to know the class name.