ID:               32172
 Comment by:       KRomas at goldentele dot com
 Reported By:      daniel dot elsner at tvi-services dot de
 Status:           Open
 Bug Type:         Variables related
 Operating System: Linux (Fedore Core3)
 PHP Version:      5.0.3
 New Comment:

bogus, not a bag

var_dump(0=='one');
var_dump(0==='one');


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

[2005-03-03 14:37:08] daniel dot elsner at tvi-services dot de

Description:
------------
a switch on a String variable go in the first case if the Variable 0.
if the variable "0" its right and he goes in default!

Reproduce code:
---------------
$fish = 0;
switch($fish) {
                case "one":
                        echo "one";
                        break;
                case "two":
                        echo "two";
                        break;
                default:
                        echo "default";
                        break;
}

Expected result:
----------------
default

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


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


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

Reply via email to