Right. The equivalency operators check data type, too.
if("1234" == 1234)
echo "== true\n";
else
echo "== false\n";
if("1234" === 1234)
echo "=== true\n";
else
echo "=== false\n";
Should print:
==true
=== false
Remember, when dealing with boolean expressions, you can't just take strange shortcuts with the expressions. There's no "associative" property like there is in mathematics. That is,
A * (B + C) == (A * B) + (A * C)
but
A == (B || C) !== (A && B) || (A && C)
You have to be explicit.
Take care,
Nik
http://www.bigaction.org/