Menu
Riverview Church

METHOD_EXISTS

Checks if the class method exists

SYNTAX

method_exists ( mixed $object , string $method_name ) : bool

PARAMETERS

object

An object instance or a class name

method_name

The method name

RETURN

Returns TRUE if the method given by method_name has been defined for the given object, FALSE otherwise.

EXAMPLES

1

true

2

true

PHP