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