PHP 8.3.4 Released!

ReflectionClass::isInterface

(PHP 5, PHP 7, PHP 8)

ReflectionClass::isInterfaceChecks if the class is an interface

Descrizione

public ReflectionClass::isInterface(): bool

Checks whether the class is an interface.

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

Restituisce true in caso di successo, false in caso di fallimento.

Esempi

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)

Vedere anche:

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top