Home > PHP > Function > SPL > class_implements()

class_implements()

class_implements - Return the interfaces which are implemented by the given class

Syntax

array class_implements (mixed $class, bool $autoload)

Arguments

  • class - An object (class instance) or a string (class name).
  • autoload - Whether to allow this function to load the class automatically through the __autoloadmagic method.

Description

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

Version

PHP 5.1.0

Return value

An array on success, or FALSE on error.