php8.5
Home/ Manual/ reflection / reflectionclass/ ReflectionClass::implementsInterface

ReflectionClass::implementsInterface

PHP function Edit on GitHub ✎

(PHP 5, PHP 7, PHP 8)

Implements interface

Description

ReflectionClass::implementsInterface(ReflectionClass|string $interface): bool

Checks whether it implements an interface.

Parameters

interface

The interface name.

Return Values

Success

Errors/Exceptions

ReflectionClass::implementsInterface throws an ReflectionException if interface is not an interface.

See Also

Source: reference/reflection/reflectionclass/implementsinterface.xml · from the official PHP manual (php/doc-en)