I was very surprised when I came across the == issue sometime ago. IMO
strings should be compared as strings. They should never be converted to
integer.


1=="1"          // always convert the number value to a string and then
compare it
"foo" == 0    //  should return false

"123abc" == "123nth" // compare as string. Do not convert to numeric values

"0"==0     //  true
0=="0."  // false

PHP is great but if we can work together to remove the flaws, then we can
make it even greater. We have to leave the past behind us and look at where
we want PHP to be in the next 5 years


Best regards,

Reply via email to