note 35729 deleted from function.define by didou
| From: | didou@php.net | Date: | Fri, 12 Sep 2003 12:12:55 +0000 |
| Subject: | note 35729 deleted from function.define by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-56370@lists.php.net to get a copy of this message | ||
Note Submitter: leingang-hates-spam@math.harvard.edu
----
To brentonb and others reading his note: I think this is expected behavior based on the rules of
the PHP parser. Bare words are first looked up as constants, then failing that, treated as strings
So if POPUP isn't define()'d, the code block
if (POPUP) {//do stuff}
transforms to
if ("POPUP") {//do stuff}
and a non-empty string casts to TRUE.