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

From: Date: Wed, 08 Apr 2020 10:50:51 +0000
Subject: Doc #79458 [NEW]: Microseconds parameter "u" needs 6 digits, not "up to" in <5.3.7
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-17473@lists.php.net to get a copy of this message
From: michal dot idzikowski at allegro dot pl Operating system: n/a PHP version: Irrelevant Package: Date/time related Bug Type: Documentation Problem Bug description:Microseconds parameter "u" needs 6 digits, not "up to" in <5.3.7 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 bug report at https://bugs.php.net/bug.php?id=79458&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=79458&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=79458&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=79458&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=79458&r=needscript Try newer version: https://bugs.php.net/fix.php?id=79458&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=79458&r=support Expected behavior: https://bugs.php.net/fix.php?id=79458&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=79458&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=79458&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=79458&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=79458&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=79458&r=dst IIS Stability: https://bugs.php.net/fix.php?id=79458&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=79458&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=79458&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=79458&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=79458&r=mysqlcfg

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