ID:               45324
 Updated by:       [EMAIL PROTECTED]
 Reported By:      philip dot almeida at ippimail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Unknown/Other Function
 Operating System: Windows && Unix
 PHP Version:      5.2.6
 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.

switch doesn't compare strictly, and 0 == 'ONE' is true.


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

[2008-06-20 16:47:11] philip dot almeida at ippimail dot com

Description:
------------
Bug in function SWITCH when processing a 0 digit.
Looks like Bug #37656: Incorrect switch example must be reopened.

Reproduce code:
---------------
$test = 0;
switch($test){
    case 'ONE':
        $result = 'one';
        break;
    case 0:
        $result = 'two';
        break;
    default:
        $result = 'default';
}

print $result;

Expected result:
----------------
two

Actual result:
--------------
one


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


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

Reply via email to