ID:               34426
 User updated by:  mbphp at netzone dot ch
 Reported By:      mbphp at netzone dot ch
 Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: Linux
 PHP Version:      4.4.0
 New Comment:

yes, i know that it works with ===, but i think the behaviour is not
correct.

why is there a type-casting if both operators are strings? 
it is slower only and the result is not correct.
if one of the operators is a numeric variable (float, int, ...)
type-casting make sense, but not if both are strings.


Previous Comments:
------------------------------------------------------------------------

[2005-09-08 12:48:45] [EMAIL PROTECTED]

Use === operator for that.

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

[2005-09-08 12:44:54] mbphp at netzone dot ch

Description:
------------
compare of 2 string with numbers >> implicit casting 

$a="1.5";
$b="1.50";

$a==$b gives true. 

which is not correct


both are strings, so casting to another type is not ucorrect i think.
if the variables are of different type casting is ok but not if both
are of the same type. 





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


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

Reply via email to