(PHP 5, PHP 7)
ReflectionClass::isInterface — Checks if the class is an interface
Checks whether the class is an interface.
Esta função não possui parâmetros.
Retorna TRUE em caso de sucesso ou FALSE em caso de falha.
Exemplo #1 Basic usage of ReflectionClass::isInterface()
<?php
interface SomeInterface {
public function interfaceMethod();
}
$class = new ReflectionClass('SomeInterface');
var_dump($class->isInterface());
?>
O exemplo acima irá imprimir:
bool(true)