RE: [PHP-WIN] Question about TRUE and FALSE
| From: | andrew morton | Date: | Mon, 21 May 2001 20:24:36 +0000 |
| Subject: | RE: [PHP-WIN] Question about TRUE and FALSE | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-7794@lists.php.net to get a copy of this message | ||
Err never mind it's there in the manual under expressions, I expected it
to be in the constants section.
sorry,
andrew
-----Original Message-----
From: andrew morton
Sent: Monday, May 21, 2001 13:21
To: Php-Windows (E-mail)
Subject: [PHP-WIN] Question about TRUE and FALSE
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
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
For additional commands, e-mail: php-windows-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net