xref: /PHP-8.0/ext/calendar/tests/bug53574_2.phpt (revision 7aacc705)
1--TEST--
2Bug #53574 (Integer overflow in SdnToJulian; leads to segfault)
3--SKIPIF--
4<?php
5include 'skipif.inc';
6if (PHP_INT_SIZE == 4) {
7        die("skip this test is for 64bit platform only");
8}
9?>
10--FILE--
11<?php
12$x = 3315881921229094912;
13
14var_dump(cal_from_jd($x, CAL_JULIAN));
15?>
16--EXPECT--
17array(9) {
18  ["date"]=>
19  string(5) "0/0/0"
20  ["month"]=>
21  int(0)
22  ["day"]=>
23  int(0)
24  ["year"]=>
25  int(0)
26  ["dow"]=>
27  int(3)
28  ["abbrevdayname"]=>
29  string(3) "Wed"
30  ["dayname"]=>
31  string(9) "Wednesday"
32  ["abbrevmonth"]=>
33  string(0) ""
34  ["monthname"]=>
35  string(0) ""
36}
37