Doc #72457 [Ver->Csd]: change in strtotime for invalid dates since 5.1.0

From: Date: Mon, 20 Jun 2016 19:24:43 +0000
Subject: Doc #72457 [Ver->Csd]: change in strtotime for invalid dates since 5.1.0
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-13564@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72457&edit=1 ID: 72457 Updated by: cmb@php.net Reported by: patrick at bigbridge dot nl Summary: change in strtotime for invalid dates since 5.1.0 -Status: Verified +Status: Closed Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant Assigned To: cmb Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2016-06-20 19:24:01] cmb@php.net Automatic comment from SVN on behalf of cmb Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=339429 Log: Fix #72457: change in strtotime for invalid dates since 5.1.0 ------------------------------------------------------------------------ [2016-06-20 13:25:06] cmb@php.net Confirmed: <https://3v4l.org/Xi2J0>. ------------------------------------------------------------------------ [2016-06-20 09:28:22] patrick at bigbridge dot nl 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 this bug report at https://bugs.php.net/bug.php?id=72457&edit=1

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