#44569 [Fbk->Bgs]: Evaluation of String as Switch/Case Parameter
| From: | colder@php.net | Date: | Sun, 30 Mar 2008 11:36:01 +0000 |
| Subject: | #44569 [Fbk->Bgs]: Evaluation of String as Switch/Case Parameter | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-123778@lists.php.net to get a copy of this message | ||
ID: 44569
Updated by: colder@php.net
Reported By: soenke at brecht dot it
-Status: Feedback
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Unix/Windows
PHP Version: 5.2.5
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.
Can't reproduce in both 5.2.5 and 5.3.0.
Previous Comments:
------------------------------------------------------------------------
[2008-03-30 11:32:36] colder@php.net
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
------------------------------------------------------------------------
[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