ID:               34503
 Updated by:       [EMAIL PROTECTED]
 Reported By:      phpbug at domaincommunication dot de
-Status:           Open
+Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: winXP SP1, SuSE Linux 9.1
 PHP Version:      4.4.0
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

See bug #34425


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

[2005-09-14 23:35:04] phpbug at domaincommunication dot de

Description:
------------
the switch statement doesn't compare the number '0' with strings
correct.

Reproduce code:
---------------
$act = 0;
$var = '';

switch($act){
   case "search":
      $var = "search"; break;
   case 0:
   case "0":
   case '0':
   case false:
   default:
      $var = "zero";
}

echo $var;

Expected result:
----------------
zero

Actual result:
--------------
search


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


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

Reply via email to