Re: var_dump( (0 == 'heading') ) == TRUE ?!

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

 



== operator type casts the string to integer before comparing
so the comparison boils down to 0 == 0 which is true
these rules also apply to the switch statement
http://php.net/manual/en/language.operators.comparison.php

but with === the typecasting does no occur

-- 
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