1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Fix date createFromTimestamp test (#12766)

Unfortuantely, PHP_INT_MIN cannot be expressed as a literal in PHP, because -NUM
is parsed as (-)(NUM). NUM is restricted to PHP_INT_MAX.
This commit is contained in:
Ilija Tovilo
2023-11-24 14:24:32 +01:00
committed by GitHub
parent fd3a8656ed
commit f6efd126a5

View File

@@ -9,7 +9,8 @@ class MyDateTime extends DateTime {};
class MyDateTimeImmutable extends DateTimeImmutable {};
define('MAX_32BIT', 2147483647);
define('MIN_32BIT', -2147483648);
// -2147483648 may not be expressed in a literal due to parsing peculiarities.
define('MIN_32BIT', -2147483647 - 1);
$timestamps = array(
1696883232,