Doc #72457 [NEW]: change in strtotime for invalid dates since 5.1.0

From: Date: Mon, 20 Jun 2016 09:28:25 +0000
Subject: Doc #72457 [NEW]: change in strtotime for invalid dates since 5.1.0
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-13559@lists.php.net to get a copy of this message
From: patrick at bigbridge dot nl Operating system: PHP version: Irrelevant Package: Documentation problem Bug Type: Documentation Problem Bug description:change in strtotime for invalid dates since 5.1.0 Description: ------------ --- From manual page: http://www.php.net/function.strtotime --- Since 5.1.0, a date containing a day >= 32 is no longer interpreted as overflowing to the next month. Day = 31 is still accepted for months that have 30 days or less, and is interpreted as day 1 of the next month. Test script: --------------- echo date('Y-m-d', strtotime('2016-04-31')); echo date('Y-m-d', strtotime('2016-05-32')); First case returns 2016-05-01, in all PHP versions. Second case returns 2016-06-01, before 5.1.0, and 1970-01-01 after 5.1.0. -- Edit bug report at https://bugs.php.net/bug.php?id=72457&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72457&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72457&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72457&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=72457&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=72457&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=72457&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=72457&r=needscript Try newer version: https://bugs.php.net/fix.php?id=72457&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=72457&r=support Expected behavior: https://bugs.php.net/fix.php?id=72457&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=72457&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=72457&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=72457&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72457&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=72457&r=dst IIS Stability: https://bugs.php.net/fix.php?id=72457&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=72457&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=72457&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=72457&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=72457&r=mysqlcfg

« previous php.doc.bugs (#13559) next »