Re: possible bug (string equality to zero)?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Scott Noyes wrote:

>> [snip]
>> Is it a bug that ($var == 0) is always true for any string $var?
>> [/snip]
>> 
>> You are comparing a string to an integer.
> 
> Right.  This is clearly documented at
> http://www.php.net/operators.comparison
> 

Oh, I see...it converts the string into number, not the other way around. 
Thanks for the link.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux