ID: 49993
Updated by: [email protected]
Reported By: sworddragon2 at aol dot com
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Windows XP Professional SP3
PHP Version: 5.3.0
New Comment:
Please read the documentation on switch/case (for any language)
carefully. This is expected behaviour. Hint, read about "break".
Previous Comments:
------------------------------------------------------------------------
[2009-10-25 23:33:08] sworddragon2 at aol dot com
Description:
------------
In this example default is triggering although the case statement is
triggering before.
Reproduce code:
---------------
switch(1)
{
case 1: echo "case 1: triggered\n";
default: echo 'default: triggered';
}
Expected result:
----------------
case 1: triggered
Actual result:
--------------
case 1: triggered
default: triggered
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=49993&edit=1