ID:               49993
 Updated by:       [email protected]
 Reported By:      sworddragon2 at aol dot com
 Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: Windows XP Professional SP3
 PHP Version:      5.3.0
 New Comment:

Hint: read what Rasmus wrote about "hint."


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

[2009-10-26 00:27:10] sworddragon2 at aol dot com

I have allready read the documentation. Maybe it's a misunderstanding
because the switch documentation isn't translated in my language but the
documentation says the following:

A special case is the default case. This case matches anything that
wasn't matched by the other cases. For example: 


If this issue is working correctly the documentation is wrong i think.

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

[2009-10-25 23:35:50] [email protected]

Please read the documentation on switch/case (for any language)
carefully.  This is expected behaviour.  Hint, read about "break".

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

[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

Reply via email to