1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 06:51:18 +02:00
Files
archived-php-src/ext/calendar/tests/bug80185.phpt
T
Christoph M. Becker 92d0a10150 Merge branch 'PHP-7.4' into master
* PHP-7.4:
  Fix #80185: jdtounix() fails after 2037
2020-10-07 14:09:32 +02:00

22 lines
527 B
PHP

--TEST--
Bug #80185 (jdtounix() fails after 2037)
--SKIPIF--
<?php
if (!extension_loaded('calendar')) die('skip ext/calendar required');
if (PHP_INT_SIZE != 8) die("skip for 64bit platforms only");
?>
--FILE--
<?php
var_dump(jdtounix(2465712));
var_dump(jdtounix(PHP_INT_MAX / 86400 + 2440588));
try {
var_dump(jdtounix(PHP_INT_MAX / 86400 + 2440589));
} catch (ValueError $ex) {
echo $ex->getMessage(), PHP_EOL;
}
?>
--EXPECT--
int(2170713600)
int(9223372036854720000)
jday must be between 2440588 and 106751993607888