Menu Home

get_declared_interfaces

osbo.com | PHP | Functions | 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] => ArrayAccess
    [4] => Serializable
    [5] => Countable
    [6] => Throwable
    [7] => DateTimeInterface
    [8] => RecursiveIterator
    [9] => OuterIterator
    [10] => SeekableIterator
    [11] => SplObserver
    [12] => SplSubject
    [13] => Reflector
    [14] => SessionHandlerInterface
    [15] => SessionIdInterface
    [16] => SessionUpdateTimestampHandlerInterface
    [17] => JsonSerializable
)

PHP