ID: 35349
Updated by: [EMAIL PROTECTED]
Reported By: martin at whitewallweb dot com
-Status: Closed
+Status: Bogus
Bug Type: Variables related
Operating System: Windows
PHP Version: 5.0.5
New Comment:
User error -> bogus
Previous Comments:
------------------------------------------------------------------------
[2005-11-23 16:12:54] martin at whitewallweb dot com
No Need...
Value 0 is value int 0 and "0" is string "0". This I could understand.
But String "PHP" is not 0 nor NULL.
$var = "PHP";
if($var === 0)
{
//Code not shown
echo "know this work";
}
=== more typing than ==
HRTFM.
------------------------------------------------------------------------
[2005-11-23 15:50:25] [EMAIL PROTECTED]
This is propably the most common "bug" reported.
RTFM.
------------------------------------------------------------------------
[2005-11-23 15:29:00] martin at whitewallweb dot com
Description:
------------
if return true if values are different $bug = 0
if($bug== "test"){echo "BUG";}
Reproduce code:
---------------
$bug = 0;
if($bug == "BUG")
{
echo ("There is a bug");
}
else
{
echo "There is no BUG";
}
Expected result:
----------------
There is no BUG
Actual result:
--------------
There is a bug
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35349&edit=1