ID: 25763
Updated by: [email][/email]
Reported By: jparneodo at yahoo dot fr
-Status: Open
+Status: Wont fix
Bug Type: Strings related
Operating System: RH7.2
PHP Version: 4.3.3
New Comment:

Answer: Because PHP is a loose-typed lanague.

== will evaluate to TRUE if the two values CAN be shown to be equal
within reason.

Calling 1.1 equal to 1.10 is within reason.

You clearly know about the === comparison type so I won't bother
pointing that out.

Previous Comments:

[2003-10-06 14:08:02] jparneodo at yahoo dot fr

I excepted true if one of the compared variable was numeric,
because of type juggling rules (Appendix K. PHP type comparison
tables), but false when the 2
variables are string.
In this case == and === must have the same result.

Reproduce code:
if($a==$b) echo "equal";
else echo "different";

Expected result:

Actual result:


Edit this bug report at [url][/url]