ID:               27434
 Updated by:       [EMAIL PROTECTED]
 Reported By:      sidou at sidou dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Variables related
 Operating System: LINUX or WIN32
 PHP Version:      4.3.4
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

RTFM:

http://nl.php.net/types.integer


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

[2004-02-29 01:01:16] sidou at sidou dot com

Description:
------------
Try the script below using a form input page with a field for the
variable $month and point the action to a page containing the script.
Try all the cases and see the result for the value of $month = 08 and
$month = 09.

And try also to input "00" or "any string".



For god sake I want to know what's wrong with this code ?

Reproduce code:
---------------
<?

switch ($month){ 

case (01): 

$mon="jan"; 

break;

case (02): 

$mon="feb"; 

break;

case (03): 

$mon="mar"; 

break;

case (04): 

$mon="apr"; 

break;

case (05): 

$mon="may"; 

break;

case (06): 

$mon="jun"; 

break;

case (07): 

$mon="jul"; 

break;

case (08): 

$mon="aug"; 

break;

case (09): 

$mon="sep"; 

break;

case (10): 

$mon="oct"; 

break;

case (11): 

$mon="nov"; 

break;

case (12): 

$mon="dec"; 

break;

default: 

print "INVALIDE MONTH !!";

}

echo ($mon);

echo ($month);

?>

Expected result:
----------------
I expect to see a logical output regarding to the simple code above, I
want to see the script printing "aug08" when I insert the value "08"
for the month in the form. same thing for "09".



and when we put "00", "any string" or BLANK the output is "aug +
USED_STRING"



Why all other values work fine ?

Actual result:
--------------
Actually, when we input $month = 08 the result is "WRONG MONTH08" even
though the case was correctly predicted in the code. Same thing for
"09".



Does PHP have any problem with August and September ?


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


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

Reply via email to