note 52777 deleted from function.defined by didou

From: Date: Thu, 12 May 2005 12:34:09 +0000
Subject: note 52777 deleted from function.defined by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-89316@lists.php.net to get a copy of this message
Note Submitter: beuss AT no spam DOT com ---- To andreashaerter at plz_no_spam dot com "You *must* use defined() with quotes:" As noticed in the doc <?php //Example echos "constant not definded!" //Set error reporting error_reporting(E_ALL); //Define your constant define('constant', 'Test'); if (defined(constant)) //Returns NOTHING, NO false, NO true and NO notice { echo "constant definded!"; } else { echo "constant not definded!"; } ?> Of course ! Constant is replaced by 'Test' so you are testing if Test if defined wich is not the case It's the expected behavior....

« previous php.notes (#89316) next »