Doc #79458 [Opn->Nab]: Microseconds parameter "u" needs 6 digits, not "up to" in <5.3.7

From: Date: Wed, 08 Apr 2020 11:05:03 +0000
Subject: Doc #79458 [Opn->Nab]: Microseconds parameter "u" needs 6 digits, not "up to" in <5.3.7
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-17474@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79458&edit=1 ID: 79458 Updated by: cmb@php.net Reported by: michal dot idzikowski at allegro dot pl Summary: Microseconds parameter "u" needs 6 digits, not "up to" in <5.3.7 -Status: Open +Status: Not a bug Type: Documentation Problem Package: Date/time related Operating System: n/a PHP Version: Irrelevant -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: Obviously, there was a respective bug in PHP 5.3.1 and 5.3.2[1], but usually we do not document bugs and bug fixes in the manual, and I cannot imagine anybody still running one of these versions in their right mind. [1] <https://3v4l.org/sNTP8#v531> Previous Comments: ------------------------------------------------------------------------ [2020-04-08 10:50:51] michal dot idzikowski at allegro dot pl Description: ------------ --- From manual page: https://php.net/datetime.createfromformat --- Format character "u" doesn't handle correctly "up to" 6 characters microseconds values in PHP < 5.3.7. I think it should be stated in docs, because system working on such version still exists because of register_globals and few other breaking changes. I choose version as "irrevelant", because docs are just misleading, no matter if it hits version 5 or 7 :) Test script: --------------- <?php $dt = DateTime::createFromFormat('u', '123'); var_dump($dt); var_dump(DateTime::getLastErrors()); Expected result: ---------------- I don't think there will be fix released for PHP5, so it could be nice to see docs updated. Actual result: -------------- No info in docs that "u" format character works differently on older PHP versions. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=79458&edit=1

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