(PHP 5)
This function returns an array with the name of the parent classes of the given class.
Příklad 1. class_parents() example
<?phpclass foo { }class bar extends foo {}print_r(class_parents(new bar));?>
Výše uvedený příklad vypíše:
Array ( [foo] => foo )