#35188 [Opn->Bgs]: switch always picks case 0
| From: | sniper@php.net | Date: | Fri, 11 Nov 2005 02:56:45 +0000 |
| Subject: | #35188 [Opn->Bgs]: switch always picks case 0 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-88025@lists.php.net to get a copy of this message | ||
ID: 35188
Updated by: sniper@php.net
Reported By: daniel at assertio dot es
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Win XP
PHP Version: 5.0.5
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
Previous Comments:
------------------------------------------------------------------------
[2005-11-11 02:47:38] daniel at assertio dot es
Description:
------------
If a switch case is 0 and the variable value evaluated in the switch is
a string, that case is picked.
Reproduce code:
---------------
$var = "hello";
switch($var){
case 0:
echo "var is 0";
break;
default:
echo "default!";
}
Expected result:
----------------
default!
Actual result:
--------------
var is 0
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35188&edit=1