ID: 34661 Updated by: [EMAIL PROTECTED] Reported By: na at index20 dot ru -Status: Open +Status: Bogus Bug Type: Date/time related Operating System: Linux PHP Version: 4.4.0 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. Please read the manual. Numbers prefixed by zero are interpreted as if they were in octal notation by PHP, and they are not valid numbers in that context; therefore, they are converted to decimal zero, which does not indicate a valid month. If you try var_dump(checkdate(9, 1, 2005)); You'll see that it works just fine. Previous Comments: ------------------------------------------------------------------------ [2005-09-27 19:15:16] na at index20 dot ru Description: ------------ Checkdate fails if month eq 8 or 9 and passed directly to function. See reproduce code. 5.1 also affected. Reproduce code: --------------- echo "buggy:\n"; var_dump(checkdate(07, 01, 2005)); var_dump(checkdate(08, 01, 2005)); var_dump(checkdate(09, 01, 2005)); var_dump(checkdate(10, 01, 2005)); $m07 = '07'; $m08 = '08'; $m09 = '09'; $m10 = '10'; echo "ok:\n"; var_dump(checkdate($m07, 01, 2005)); var_dump(checkdate($m08, 01, 2005)); var_dump(checkdate($m09, 01, 2005)); var_dump(checkdate($m10, 01, 2005)); Expected result: ---------------- buggy: bool(true) bool(true) bool(true) bool(true) ok: bool(true) bool(true) bool(true) bool(true) Actual result: -------------- buggy: bool(true) bool(false) bool(false) bool(true) ok: bool(true) bool(true) bool(true) bool(true) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34661&edit=1