Bug #81107 [NEW]: Regression in 8.1: sorting dates differ from > operator
From: kylekatarnls at gmail dot com
Operating system: Ubuntu
PHP version: master-Git-2021-06-04 (Git)
Package: Date/time related
Bug Type: Bug
Bug description:Regression in 8.1: sorting dates differ from > operator
Description:
------------
Previously (PHP 7.4 and 8.0) when a date with year = PHP_INT_MAX were >
to a date with any lower year, it was convenient to represent an
absolute maximum. And it was rather expected.
Now in 8.1 (latest on GitHub Actions), it became lower.
Test script:
---------------
var_dump(
(new DateTimeImmutable('2000-12-31
23:59:59.999999'))->setDate(PHP_INT_MAX, 12, 31) >
new DateTimeImmutable('2019-01-26 10:30:12.000000')
);
Expected result:
----------------
true
Actual result:
--------------
false
--
Edit bug report at https://bugs.php.net/bug.php?id=81107&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=81107&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=81107&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=81107&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=81107&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=81107&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=81107&r=support
Expected behavior: https://bugs.php.net/fix.php?id=81107&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=81107&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=81107&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=81107&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=81107&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=81107&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=81107&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=81107&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=81107&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=81107&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=81107&r=mysqlcfg
Thread (3 messages)
- kylekatarnls at gmail dot com