Monday, 26 August 2013

PHP Function get_declared_interfaces()

Syntax

get_declared_interfaces ( void );

Definition and Usage

This function gets the declared interfaces.

Paramters

ParameterDescription
voidvoid 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 following result:
Array
(
    [0] => Traversable
    [1] => IteratorAggregate
    [2] => Iterator
    [3] => ArrayAccess
    [4] => reflector
    [5] => RecursiveIterator
    [6] => SeekableIterator
)

No comments:

Post a Comment