PHP Wysardry
PHP Manual

PHP documentation.



Home / PHP / Manual / ...



PHP Manual
Prev Next

defined

(PHP 3 <= 3.0.18, PHP 4 >= 4.0.0)

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.


Prev Manual Home Next
define Up die
Site Menu

Amazon.ca
Amazon.com
Amazon.co.uk



Most recently updated on 11 May, 2003

Home / PHP / Manual / ...



Please feel free to contact us with any comments or suggestions
PHP Manual
PHP Wysardry

This site is hosted by Spaceports