From 1b6f6bd0d7662458964b43e9db7cb9008f41df87 Mon Sep 17 00:00:00 2001 From: Ron Chmara Date: Thu, 2 Nov 2000 06:38:45 +0000 Subject: [PATCH] Example for defined() git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@35033 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/misc.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/functions/misc.xml b/functions/misc.xml index 0d069ae328..88e3892525 100644 --- a/functions/misc.xml +++ b/functions/misc.xml @@ -171,6 +171,16 @@ echo CONSTANT; // outputs "Hello world." Returns true if the named constant given by name has been defined, false otherwise. + + Checking Constants + +<?php +if (defined("CONSTANT")){ // Note that it should be quoted + echo CONSTANT; // + } +?> + + See also define and the section on