1--TEST--
2Bug #80185 (jdtounix() fails after 2037)
3--SKIPIF--
4<?php
5if (!extension_loaded('calendar')) die('skip ext/calendar required');
6if (PHP_INT_SIZE != 4) die("skip for 32bit platforms only");
7?>
8--FILE--
9<?php
10try {
11    var_dump(jdtounix(2465712));
12} catch (ValueError $ex) {
13    echo $ex->getMessage(), PHP_EOL;
14}
15var_dump(jdtounix(PHP_INT_MAX / 86400 + 2440588));
16try {
17    var_dump(jdtounix(PHP_INT_MAX / 86400 + 2440589));
18} catch (ValueError $ex) {
19    echo $ex->getMessage(), PHP_EOL;
20}
21?>
22--EXPECT--
23jday must be between 2440588 and 2465443
24int(2147472000)
25jday must be between 2440588 and 2465443
26