(PHP 5)
ReflectionClass::isInterface — Checks if the class is an interface
Checks whether the class is an interface.
此函数没有参数。
成功时返回 TRUE
, 或者在失败时返回 FALSE
.
Example #1 Basic usage of ReflectionClass::isInterface()
<?php
interface SomeInterface {
public function interfaceMethod();
}
$class = new ReflectionClass('SomeInterface');
var_dump($class->isInterface());
?>
以上例程会输出:
bool(true)