Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<ReflectionClass::isInstantiableReflectionClass::isInternal>
^ReflectionClassLast updated: Mon, 26 Oct 2026

ReflectionClass::isInterface

(PHP 5, PHP 7, PHP 8)

ReflectionClass::isInterface — Checks if the class is an interface

Description

public function ReflectionClass::isInterface(): bool

Checks whether the class is an interface.

Parameters

This function has no parameters.

Return Values

Returns true if the class is an interface or false otherwise.

Examples

Example #1 Basic usage of ReflectionClass::isInterface()

<?php
interface SomeInterface {
    public function interfaceMethod();
}

$class = new ReflectionClass('SomeInterface');
var_dump($class->isInterface());
?>

The above example will output:

bool(true)

See Also


<ReflectionClass::isInstantiableReflectionClass::isInternal>
^ReflectionClassLast updated: Mon, 26 Oct 2026