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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to