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