![]() |
|
|
+ Search |
![]()
|
Feb 7th, 2000 05:12
Nathan Wallace, Rasmus Lerdorf
Sure it should. PHP is a loosely typed language. This is how loosely typed languages work. You need to be able to compare 1 to "1" for example. The integer equivalent of "hello" is 0 and thus 0 == "hello". If you want a string comparison, force both args to be strings or use strcmp(). In PHP 4 there is a new operator === which does a strict compare.