ID:               25763
 Updated by:       [EMAIL PROTECTED]
 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

Description:
------------
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:
---------------
$a=(string)"1.1";
$b=(string)"1.10";
if($a==$b) echo "equal";
else echo "different";


Expected result:
----------------
different

Actual result:
--------------
equal


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=25763&edit=1

Reply via email to