xref: /PHP-5.3/ext/date/tests/bug53437_var2.phpt (revision f16143f5)
1--TEST--
2Bug #53437 DateInterval basic serialization
3--FILE--
4<?php
5$di0 = new DateInterval('P2Y4DT6H8M');
6
7$s = serialize($di0);
8
9$di1 = unserialize($s);
10
11var_dump($di0, $di1);
12
13?>
14==DONE==
15--EXPECT--
16object(DateInterval)#1 (15) {
17  ["y"]=>
18  int(2)
19  ["m"]=>
20  int(0)
21  ["d"]=>
22  int(4)
23  ["h"]=>
24  int(6)
25  ["i"]=>
26  int(8)
27  ["s"]=>
28  int(0)
29  ["weekday"]=>
30  int(0)
31  ["weekday_behavior"]=>
32  int(0)
33  ["first_last_day_of"]=>
34  int(0)
35  ["invert"]=>
36  int(0)
37  ["days"]=>
38  bool(false)
39  ["special_type"]=>
40  int(0)
41  ["special_amount"]=>
42  int(0)
43  ["have_weekday_relative"]=>
44  int(0)
45  ["have_special_relative"]=>
46  int(0)
47}
48object(DateInterval)#2 (15) {
49  ["y"]=>
50  int(2)
51  ["m"]=>
52  int(0)
53  ["d"]=>
54  int(4)
55  ["h"]=>
56  int(6)
57  ["i"]=>
58  int(8)
59  ["s"]=>
60  int(0)
61  ["weekday"]=>
62  int(0)
63  ["weekday_behavior"]=>
64  int(0)
65  ["first_last_day_of"]=>
66  int(0)
67  ["invert"]=>
68  int(0)
69  ["days"]=>
70  int(0)
71  ["special_type"]=>
72  int(0)
73  ["special_amount"]=>
74  int(0)
75  ["have_weekday_relative"]=>
76  int(0)
77  ["have_special_relative"]=>
78  int(0)
79}
80==DONE==
81