ReflectionClass
PHP Manual

ReflectionClass::isInterface

(PHP 5, PHP 7)

ReflectionClass::isInterfaceChecks if the class is an interface

설명

public bool ReflectionClass::isInterface ( void )

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)

참고


ReflectionClass
PHP Manual