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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user