PHP defined() Function
Example
Check whether a constant exists:
Run Example »
Definition and Usage
The defined() function checks whether a constant exists.
Syntax
defined(
name
)
| Parameters | Description |
|---|---|
| name | Required. Specifies the name of the constant to check. |
Technical Details
| Return Value: | Returns TRUE if the constant exists, otherwise FALSE. |
|---|---|
| PHP Version: | 4+ |
PHP Misc Reference Manual