array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'it', ), 'this' => array ( 0 => 'reflectionclass.isinterface.php', 1 => 'ReflectionClass::isInterface', 2 => 'Checks if the class is an interface', ), 'up' => array ( 0 => 'class.reflectionclass.php', 1 => 'ReflectionClass', ), 'prev' => array ( 0 => 'reflectionclass.isinstantiable.php', 1 => 'ReflectionClass::isInstantiable', ), 'next' => array ( 0 => 'reflectionclass.isinternal.php', 1 => 'ReflectionClass::isInternal', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/reflection/reflectionclass/isinterface.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
(PHP 5, PHP 7, PHP 8)
ReflectionClass::isInterface — Checks if the class is an interface
Questa funzione non contiene parametri.
Example #1 Basic usage of ReflectionClass::isInterface()
<?php
interface SomeInterface {
public function interfaceMethod();
}
$class = new ReflectionClass('SomeInterface');
var_dump($class->isInterface());
?>
Il precedente esempio visualizzerĂ :
bool(true)