-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed as not planned
Labels
Description
Description
The following code:
<?php
class MyDateTimeZone extends DateTimeZone
{
function __construct()
{
}
}
$mdtz = new MyDateTimeZone();
$fusion = $mdtz;
$fn = function() use (&$d) {
$d = date_create("2005-07-14 22:30:41", $fusion);
try {
date_isodate_set($d, PHP_INT_MAX, PHP_INT_MIN, PHP_FLOAT_MIN);
} catch (Exception $ex) {
echo $ex->getTraceAsString();
}
};
try {
$d = 'd';
$fn();
} catch (Exception $ex) {
echo $ex->getTraceAsString();
}
try {
$d = 'd';
$fn();
} catch (Exception $ex) {
echo $ex->getTraceAsString();
}
?>
Resulted in this output:
/home/dan/php-src/ext/date/lib/dow.c:157:20: runtime error: signed integer overflow: -9223372036854775808 - 1 cannot be represented in type 'long long int'
But I expected this output instead:
PHP Version
8.4.1
Operating System
No response