#34426 [Opn->Bgs]: implicit string casting problem
| From: | tony2001@php.net | Date: | Thu, 08 Sep 2005 10:48:46 +0000 |
| Subject: | #34426 [Opn->Bgs]: implicit string casting problem | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-84722@lists.php.net to get a copy of this message | ||
ID: 34426
Updated by: tony2001@php.net
Reported By: mbphp at netzone dot ch
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Linux
PHP Version: 4.4.0
New Comment:
Use === operator for that.
Previous Comments:
------------------------------------------------------------------------
[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