Possible Duplicate:
php: determining class hierarchy of an object at runtime
Is there a way to get a list of parent classes for a certaint class?
For example:
class a{
public function getParentsList(){...}
}
class b extends a{}
class c extends b{}
$c=new c;
var_dump($c->getParentsList());
should print array(a,b)
10x in advance
You may use the reflection classes http://www.php.net/manual/en/book.reflection.php
A working example seems to be this one: http://www.php.net/manual/en/reflectionclass.getparentclass.php#100978
I've seen an answer to this before: