note 11911 added to function.define.php
| From: | ndk at otello dot alma dot unibo dot it | Date: | Tue, 13 Mar 2001 11:07:26 +0000 |
| Subject: | note 11911 added to function.define.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-12329@lists.php.net to get a copy of this message | ||
Seems there's an unhortogonal behaviour between defined constants and explicit constants when
inside double quotes:
define(ZERO, 0);
$ARR=array("zero", "nonzero");
echo "- $ARR[ZERO] - $ARR[0] -\n";
What one expects from the above code is thar "- zero - zero -" gets printed, instead
"- - zero -" is actually printed.
http://www.php.net/manual/en/function.define.php