(PHP 5, PHP 7, PHP 8)
ReflectionClass::isInterface — 檢查類別是否為介面
此函式沒有參數。
範例 #1 ReflectionClass::isInterface() 的基本用法
<?php
interface SomeInterface {
public function interfaceMethod();
}
$class = new ReflectionClass('SomeInterface');
var_dump($class->isInterface());
?>
以上範例會輸出
bool(true)