#33969 [Opn->Bgs]: No out
| From: | rasmus@php.net | Date: | Tue, 02 Aug 2005 15:08:22 +0000 |
| Subject: | #33969 [Opn->Bgs]: No out | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-82824@lists.php.net to get a copy of this message | ||
ID: 33969
Updated by: rasmus@php.net
Reported By: webmaster at ebv dot com dot br
-Status: Open
+Status: Bogus
Bug Type: Output Control
Operating System: case
PHP Version: 4.3.11
New Comment:
You have discovered octal numbers. Remove the leading 0's or put
qoutes around them to treat them as strings.
Previous Comments:
------------------------------------------------------------------------
[2005-08-02 17:02:32] webmaster at ebv dot com dot br
Description:
------------
case no out 08 and 09
O Case não retorna! 08 e 09
Reproduce code:
---------------
echo $atemes = '08';
switch($atemes) {
case 01:
echo $messql2 = 'Jan';
break;
case 08:
echo $messql2 = 'Aug';
break;
case 09:
echo $messql2 = 'Sep';
break;
}
Expected result:
----------------
case "01" ok --- "01" or "1"
case "02" ok
...
case "08" beeeeeee! NO!! (case 8 ok) --> 08 no 8 yes (only)
case "09" beeeeeee! NO!! (case 9 ok) --> 09 no 9 yes (only)
case "10" ok
...
Actual result:
--------------
echo "mes 1 ".$messql."<br>";
echo "atmes ".$atemes."<br>";
echo $atemes = '08';
switch($atemes) {
case 01:
echo $messql2 = 'Jan';
break;
case 8:
echo $messql2 = 'Aug';
break;
case 9:
echo $messql2 = 'Sep';
break;
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33969&edit=1