ID:               44569
 Updated by:       [EMAIL PROTECTED]
 Reported By:      soenke at brecht dot it
-Status:           Open
+Status:           Feedback
 Bug Type:         Scripting Engine problem
 Operating System: Unix/Windows
 PHP Version:      5.2.5
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.3-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.3-win32-installer-latest.msi




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

[2008-03-30 11:06:57] soenke at brecht dot it

Description:
------------
Case seems to evaluate only parts of the given case name against the in
case given comparator.

In the given example it aways runs into the first case, comparing only
the first four characters of both strings.

Reproduce code:
---------------
decide("Items");
decide("Item");
decide("some");

function decide ($parameter){

 Switch($parameter){
  case "Items":
   echo "These are all items \n";
   break;
  case "Item":
   echo "A single Item \n";
   break;
  default:
   echo "not listed";
 }//end switch
}//end function

Expected result:
----------------
These are all items
A single item
not listed

Actual result:
--------------
These are all items
These are all items
not listed


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


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

Reply via email to