class_parents
(PHP 5)
class_parents --
Return the parent classes of the given class
Beskrivelse
array
class_parents ( mixed class [, bool autoload] )
This function returns an array with the name of the parent classes of
the given class.
Parameterliste
- class
An object or a string of the class
Returneringsværdier
Returns an array or FALSE on error.
Eksempler
Eksempel 1. class_parents() example
<?php
class foo { } class bar extends foo {}
print_r(class_parents(new bar));
?>
|
Ovenstående eksempel vil udskrive: |