(PHP 3, PHP 4 >= 4.0b1)
defined --
Checks whether a given named constant exists
Description
bool defined
(string name)
Returns TRUE if the named constant given by
name has been defined,
FALSE otherwise.
Example 1. Checking Constants
<?php
if (defined("CONSTANT")){ // Note that it should be quoted
echo CONSTANT; //
}
?>
|
|
See also define(),
constant() and the section on Constants.