ReflectionClass::isSubclassOf
PHP function
Edit on GitHub ✎
(PHP 5, PHP 7, PHP 8)
Checks if a subclass
Description
ReflectionClass::isSubclassOf(ReflectionClass|string $class): bool
Checks if the class is a subclass of a specified class or implements a specified interface.
Parameters
classEither the name of the class as
stringor aReflectionClassobject of the class to check against.
Return Values
Returns true if the class is a subclass of the specified class or interface, or false otherwise.
See Also
ReflectionClass::isInterfaceReflectionClass::implementsInterfaceis_subclass_of()get_parent_class()