(PHP 5)
This function returns an array with the name of the parent classes of the given class.
An object or a string of the class
Returns an array or FALSE on error.
例子 1. class_parents() example
<?phpclass foo { }class bar extends foo {}print_r(class_parents(new bar));?>
上例将输出:
Array ( [foo] => foo )