PHP defined() Function

The defined() function checks whether a constant exists.

bool defined ( string $name )

Checks whether the given constant exists and is defined.

Example -

ParameterDescription
nameThe constant name.

Return Values

Returns TRUE if the named constant given by name has been defined, FALSE otherwise.