Closed
Description
Description
The following code:
<?php
define("MAX_64Bit", 9223372036854775807);
define("MIN_64Bit", -9223372036854775807 - 1);
$longVals = array(
MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
);
foreach ($longVals as $longVal) {
}
$fusion = $longVal;
$d1 = new DateTime('now',new DateTimeZone('Europe/Paris'));
$d2 = new DateTime('now',new DateTimeZone('Europe/Paris'));
$d1->setTimestamp($fusion);
$diff = $d1->diff($d2);
Resulted in this output:
runtime error: signed integer overflow: 1731482775 - -9223372036854775808 cannot be represented in type 'long long'
PHP Version
nightly
Operating System
ubuntu 22.04