#37021 [Opn->Bgs]: the determination of condition was wrong
| From: | tony2001@php.net | Date: | Sat, 08 Apr 2006 19:11:25 +0000 |
| Subject: | #37021 [Opn->Bgs]: the determination of condition was wrong | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-95471@lists.php.net to get a copy of this message | ||
ID: 37021
Updated by: tony2001@php.net
Reported By: liber at iproom dot com
-Status: Open
+Status: Bogus
Bug Type: *General Issues
Operating System: Windows XP
PHP Version: 5.1.3RC2
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Previous Comments:
------------------------------------------------------------------------
[2006-04-08 19:00:28] liber at iproom dot com
Description:
------------
if the string is starting by characters,
it will be true if compare with zero.
Reproduce code:
---------------
$a="a.1afdsfdsfsd";
if($a==0) {
echo "YES";
}
shows YES
$a=".1afdsfdsfsd";
if($a==0) {
echo "YES";
}
shows nothing
$a="1afdsfdsfsd";
if($a==0) {
echo "YES";
}
shows nothing
Expected result:
----------------
$a="a.1afdsfdsfsd";
if($a==0) {
echo "YES";
}
shows nothing
Actual result:
--------------
$a="a.1afdsfdsfsd";
if($a==0) {
echo "YES";
}
shows YES
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37021&edit=1