ReflectionClass::isInterface

(PHP 5, PHP 7)

ReflectionClass::isInterface锟斤拷锟斤拷锟斤拷欠锟斤拷锟揭伙拷锟斤拷涌冢锟絠nterface锟斤拷

说锟斤拷

public ReflectionClass::isInterface ( void ) : bool

锟斤拷锟斤拷锟斤拷欠锟斤拷锟揭伙拷锟斤拷涌冢锟絠nterface锟斤拷锟斤拷

锟斤拷锟斤拷

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

锟斤拷锟斤拷值

锟缴癸拷时锟斤拷锟斤拷 TRUE锟斤拷 锟斤拷锟斤拷锟斤拷失锟斤拷时锟斤拷锟斤拷 FALSE锟斤拷

锟斤拷锟斤拷

Example #1 ReflectionClass::isInterface() 锟斤拷锟斤拷锟矫凤拷

<?php
interface SomeInterface {
    public function 
interfaceMethod();
}

$class = new ReflectionClass('SomeInterface');
var_dump($class->isInterface());
?>

锟斤拷锟斤拷锟斤拷锟教伙拷锟斤拷锟斤拷锟�

bool(true)

锟轿硷拷