mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02: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:
parent
fd3a8656ed
commit
f6efd126a5
1 changed files with 2 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue