class_implements

PHP 5, PHP 7, PHP 8
class_implements - Return the interfaces which are implemented by the given class or interface
Manual
Code Examples

class_implements( object|string$object_or_class, [bool$autoload = true] ): array|false

This function returns an array with the names of the interfaces that the given object_or_class and its parents implement.

Parameters

object_or_class

An object (class instance) or a string (class or interface name).

autoload

Whether to call __autoload by default.

Return Values

An array on success, or false when the given class doesn't exist.

Related Functions

Example of class_implements

Show all examples for class_implements

PHP Version:


Function class_implements:

Standard PHP Library (SPL) Functions

Most used PHP functions