#45163 [Opn->Fbk]: SWITCH statement incorrect
| From: | jani@php.net | Date: | Thu, 05 Jun 2008 18:10:12 +0000 |
| Subject: | #45163 [Opn->Fbk]: SWITCH statement incorrect | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-125531@lists.php.net to get a copy of this message | ||
ID: 45163
Updated by: jani@php.net
Reported By: waps at pisem dot net
-Status: Open
+Status: Feedback
Bug Type: Scripting Engine problem
Operating System: Win Vista x32 Business
PHP Version: 5.2.6
New Comment:
Please provide a script that has some possibility to work, logically
too. A proper reproducing script starts with <?php and ends with ?>, is
no longer than 20 lines and is self-contained in every way.
Previous Comments:
------------------------------------------------------------------------
[2008-06-04 05:36:31] waps at pisem dot net
Description:
------------
SWITCH statement incorrect work from data types. In exemple I write
code.
Reproduce code:
---------------
$strCode = 0;
switch( $strFileType )
{
case 'jpg':
case 'jpeg':
echo 'point 0';
break;
case 'gif':
echo 'point 1';
break;
default:
echo 'point 3';
}
Expected result:
----------------
echo string "point 0"
Actual result:
--------------
I have to view "point 3", but no "point 0"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45163&edit=1