xref: /PHP-8.3/ext/calendar/tests/bug53574_1.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 32bit platform only");
9}
10?>
11--FILE--
12<?php
13$x = 882858043;
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(5)
29  ["abbrevdayname"]=>
30  string(3) "Fri"
31  ["dayname"]=>
32  string(6) "Friday"
33  ["abbrevmonth"]=>
34  string(0) ""
35  ["monthname"]=>
36  string(0) ""
37}
38