xref: /php-src/ext/date/tests/bug79015.phpt (revision 85fbc6ea)
1--TEST--
2Bug #79015 (undefined-behavior in php_date.c)
3--FILE--
4<?php
5$payload = 'O:12:"DateInterval":9:{s:1:"y";i:1;s:1:"m";i:0;s:1:"d";i:4;s:1:"h";i:0;s:1:"i";i:0;s:1:"s";i:0;s:1:"f";i:9999999999990;s:6:"invert";i:0;s:4:"days";b:0;}';
6var_dump(unserialize($payload));
7?>
8--EXPECTF--
9object(DateInterval)#%d (%d) {
10  ["y"]=>
11  int(1)
12  ["m"]=>
13  int(0)
14  ["d"]=>
15  int(4)
16  ["h"]=>
17  int(0)
18  ["i"]=>
19  int(0)
20  ["s"]=>
21  int(0)
22  ["f"]=>
23  float(%f)
24  ["invert"]=>
25  int(0)
26  ["days"]=>
27  bool(false)
28  ["from_string"]=>
29  bool(false)
30}
31