ReflectionClass::getInterfaceNames

(PHP 5 >= 5.2.0, PHP 7)

ReflectionClass::getInterfaceNames锟斤拷取锟接口o拷interface锟斤拷锟斤拷锟斤拷

说锟斤拷

public ReflectionClass::getInterfaceNames ( void ) : array

锟斤拷取锟接口o拷interface锟斤拷锟斤拷锟狡★拷

锟斤拷锟斤拷

锟剿猴拷锟斤拷没锟叫诧拷锟斤拷锟斤拷

锟斤拷锟斤拷值

一锟斤拷锟斤拷值锟斤拷锟介,锟接口o拷interface锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟街碉拷锟�

锟斤拷锟斤拷

Example #1 ReflectionClass::getInterfaceNames() 锟斤拷锟斤拷

<?php
interface Foo { }

interface 
Bar { }

class 
Baz implements FooBar { }

$rc1 = new ReflectionClass("Baz");

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

锟斤拷锟斤拷锟斤拷锟教碉拷锟斤拷锟斤拷锟斤拷锟斤拷冢锟�

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

锟轿硷拷