xref: /PHP-5.6/ext/calendar/tests/bug53574_1.phpt (revision 3b4b1a79)
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 32bit platform only");
8}
9?>
10--FILE--
11<?php
12$x = 882858043;
13
14var_dump(cal_from_jd($x, CAL_JULIAN));
15--EXPECT--
16array(9) {
17  ["date"]=>
18  string(5) "0/0/0"
19  ["month"]=>
20  int(0)
21  ["day"]=>
22  int(0)
23  ["year"]=>
24  int(0)
25  ["dow"]=>
26  int(5)
27  ["abbrevdayname"]=>
28  string(3) "Fri"
29  ["dayname"]=>
30  string(6) "Friday"
31  ["abbrevmonth"]=>
32  string(0) ""
33  ["monthname"]=>
34  string(0) ""
35}
36
37