Doc #73551 [NEW]: new DateTime() with microsec is BC
| From: | aa dot vasilenko at gmail dot com | Date: | Thu, 17 Nov 2016 07:30:42 +0000 |
| Subject: | Doc #73551 [NEW]: new DateTime() with microsec is BC | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-14113@lists.php.net to get a copy of this message | ||
From: aa dot vasilenko at gmail dot com
Operating system:
PHP version: 7.1.0RC6
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:new DateTime() with microsec is BC
Description:
------------
Fix for #48225 in 7.10RC4 broke tests on our side. Basically now it's
not possible to assume that 2
\new DateTime() are the same. Of course
this is bad behavior but I'm nearly sure that a lot of business logic is
using it.
Would be nice to list it as a breaking change in documentation or
"What's New" to prepare developers better for upcoming 7.1 release
Test script:
---------------
<?php
$a = new DateTime();
for ($i = 0; $i < 100; $i++) {
//noop, just to let some microseconds pass
}
$b = new DateTime();
var_dump($a == $b);
Expected result:
----------------
true
//<7.1RC4
Actual result:
--------------
false
//>=7.1RC4
--
Edit bug report at https://bugs.php.net/bug.php?id=73551&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73551&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73551&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73551&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=73551&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=73551&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=73551&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=73551&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=73551&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=73551&r=support
Expected behavior: https://bugs.php.net/fix.php?id=73551&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=73551&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=73551&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=73551&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73551&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=73551&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=73551&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=73551&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=73551&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=73551&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=73551&r=mysqlcfg