PHP - Function get_declared_interfaces()


Advertisements


Syntax

get_declared_interfaces ( void );

Definition and Usage

This function gets the declared interfaces.

Parameters

Parameter Description
void void means no parameter is required.

Return Value

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

Example

Following is the usage of this function −

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

It will produce the following result −

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

php_function_reference.htm

Advertisements