ReflectionClass
PHP Manual

ReflectionClass::getInterfaceNames

(PHP 5 >= 5.2.0)

ReflectionClass::getInterfaceNamesGets the interface names

说明

public array ReflectionClass::getInterfaceNames ( void )

Get the interface names.

参数

此函数没有参数。

返回值

A numerical array with interface names as the values.

范例

Example #1 ReflectionClass::getInterfaceNames() example

<?php
interface Foo { }

interface 
Bar { }

class 
Baz implements FooBar { }

$rc1 = new ReflectionClass("Baz");

print_r($rc1->getInterfaceNames());
?>

以上例程的输出类似于:

Array
(
    [0] => Foo
    [1] => Bar
)

参见


ReflectionClass
PHP Manual