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
interfaceThe interface name.
Return Values
Success
Errors/Exceptions
ReflectionClass::implementsInterface throws an ReflectionException if interface is not an interface.
See Also
ReflectionClass::isInterfaceReflectionClass::isSubclassOfinterface_exists()- Object Interfaces