Question about TRUE and FALSE
| From: | andrew morton | Date: | Mon, 21 May 2001 20:20:37 +0000 |
| Subject: | Question about TRUE and FALSE | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-7793@lists.php.net to get a copy of this message | ||
Anyone have any idea why the constant TRUE evaluates to 1 but FALSE
evaluates to "" and not 0?
The fragment
if (!"") print "true";
else print "false";
works the same as
if (!FALSE) print "true";
else print "false";
I'm used to the Cish behavior of false=0 and true!=0, is this something
that was inherited from Perl?
andrew