class_parents
(PHP 5)
class_parents --
Return the parent classes of the given class
Description
array
class_parents ( mixed class [, bool autoload] )
This function returns an array with the name of the parent classes of
the given class.
Parameters
- class
An object or a string of the class
Return Values
Returns an array or FALSE on error.
Examples
Example 1. class_parents() example
<?php
class foo { } class bar extends foo {}
print_r(class_parents(new bar));
?>
|
The above example will output: |