note 92296 deleted from function.define by cmb

From: Date: Sun, 06 Oct 2019 07:55:01 +0000
Subject: note 92296 deleted from function.define by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-212482@lists.php.net to get a copy of this message
Note Submitter: sixd at php dot net ---- A note on redefining: Constants can't be redefined: $ php -r "define('A', 1); var_dump('A'); define('A', 2); var_dump('A');"; string(1) "A" PHP Notice: Constant A already defined in Command line code on line 1 string(1) "A" But using the case insensitive setting shows that the internal representation is lower case: $ php -r "define('A', 1, true); var_dump('A'); define('A', 2); var_dump('A');"; string(1) "A" string(1) "A" Note the lower case 'a' in the second define() here: $ php -r "define('A', 1, true); var_dump('A'); define('a', 2); var_dump('A');"; string(1) "A" PHP Notice: Constant a already defined in Command line code on line 1 string(1) "A"

« previous php.notes (#212482) next »