get_declared_interfaces

Returns an array of all declared interfaces

Syntax

get_declared_interfaces ( void ) : array

Return

Returns an array of the names of the declared interfaces in the current script.

Examples

<?

$return = get_declared_interfaces();

print_r($return);

?>
Array
(
    [0] => Traversable
    [1] => IteratorAggregate
    [2] => Iterator
    [3] => Serializable
    [4] => ArrayAccess
    [5] => Countable
    [6] => Stringable
    [7] => Throwable
    [8] => DateTimeInterface
    [9] => RecursiveIterator
    [10] => OuterIterator
    [11] => SeekableIterator
    [12] => SplObserver
    [13] => SplSubject
    [14] => JsonSerializable
    [15] => Reflector
    [16] => SessionHandlerInterface
    [17] => SessionIdInterface
    [18] => SessionUpdateTimestampHandlerInterface
    [19] => DOMParentNode
    [20] => DOMChildNode
)

PHP

Home Menu