note 58768 deleted from function.define by betz

From: Date: Tue, 04 Dec 2007 22:55:36 +0000
Subject: note 58768 deleted from function.define by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-132818@lists.php.net to get a copy of this message
Note Submitter: IK ---- [Editor's Note: Obviously, constants cannot be redefined. That is the meaning of a constant.] Just a quick note.. If a constant is once defined, any subsequent attempts to define it once again are ignored. <? define('WHAT_DID_YOU_EXPECT', 'First'); define('WHAT_DID_YOU_EXPECT', 'Second'); echo WHAT_DID_YOU_EXPECT ?> Outputs 'First'. I really thought I have gone mad when I saw just the last two lines of code (the first one was in another file) and it was echoing 'First'..

« previous php.notes (#132818) next »