PHP defined() Function
Complete PHP Misc Reference
Definition and Usage
The defined() function checks whether a constant exists.
Returns TRUE if the constant exists, or FALSE otherwise.
Syntax
| Parameter |
Description |
| name |
Required. Specifies the name of the constant to check |
Example
<?php
define("GREETING","Hello you! How are you today?");
echo defined("GREETING");
?>
|
The output of the code above will be:
Complete PHP Misc Reference

The Altova MissionKit is an integrated suite of tools ideal for:
- XML development
- Web & Web services development
- Data mapping & integration
- Rendering & publishing XML & database data
- XBRL validation, taxonomy editing, transformation & rendering
The MissionKit for XML Developers includes XMLSpy® - the industry-leading XML editor; MapForce® - a
graphical data mapping, conversion, and integration tool; StyleVision® - a visual XSLT stylesheet designer;
DiffDog® - an XML-aware diff/merge tool; and 2 additional tools.
Try all 6 products free for 30 days!
Download a fully-functional free trial
|
|
|
|