From: Operating system: Windows 7 enterprise PHP version: 5.3.2 Package: Date/time related Bug Type: Bug Bug description:mktime(0,0,0,0,0,0) returns a timestamp instead of false
Description: ------------ When you try to get the timestamp for day 0 of month 0 of the year 0, php returns 943916400 instead of false. It should return false because the input is clearly an invalid date and "0000-00-00" is not equal to "1999-11-30" Test script: --------------- <?php echo mktime(0,0,0,0,0,0); Expected result: ---------------- According to the documentation: "mktime() returns the Unix timestamp of the arguments given. If the arguments are invalid, the function returns FALSE (before PHP 5.1 it returned -1)." Therefore the output should be FALSE and not 943916400 Actual result: -------------- The actual result = 943916400 -- Edit bug report at http://bugs.php.net/bug.php?id=52154&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52154&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52154&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52154&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52154&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52154&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52154&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52154&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52154&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52154&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52154&r=support Expected behavior: http://bugs.php.net/fix.php?id=52154&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52154&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52154&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52154&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52154&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=52154&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52154&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52154&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52154&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52154&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52154&r=mysqlcfg