NYCPHP Meetup

NYPHP.org

[nycphp-talk] What's going on here? PHP conditional.

Aaron Fischer agfische at email.smith.edu
Fri Jul 2 11:22:11 EDT 2004


 From the NYPHP Phundamentals site, I think this may help answer your  
question:
http://phundamentals.nyphp.org/PH_variableevaluation.php?expiredate=10/ 
10/2003

-Aaron

On Jul 2, 2004, at 11:18 AM, Brian Kaney wrote:

> Does anyone know why (0 == 'string') evaluates to true?
>
> According to the manual, the integer 0 converts to FALSE.  A non-empty
> (or non-zero) string is considered TRUE. I would think if (FALSE ==
> TRUE) should be evaluated as false?
>
> http://us2.php.net/manual/en/ 
> language.types.boolean.php#language.types.boolean.casting
>
>
> - Brian




More information about the talk mailing list