ID:               33969
 Updated by:       [EMAIL PROTECTED]
 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

Reply via email to