get_declared_interfaces

Returns an array of all declared interfaces (PHP 5)
array get_declared_interfaces ( )

This function returns an array of the names of the declared interfaces in the current script.

例 352. get_declared_interfaces() example

<?php
print_r
(get_declared_interfaces());
?>

上例的输出类似于:

Array
(
   [0] => Traversable
   [1] => IteratorAggregate
   [2] => Iterator
   [3] => ArrayAccess
   [4] => reflector
   [5] => RecursiveIterator
   [6] => SeekableIterator
)

See also get_declared_classes().