xref: /PHP-7.1/ext/date/tests/bug53437_var4.phpt (revision 55626549)
1--TEST--
2Bug #53437 (Check that var_dump out is the same using the whole object or it's single properties), variation 4
3--INI--
4date.timezone = Europe/Berlin
5--FILE--
6<?php
7$dt = new DateTime('2009-10-11');
8
9$df = $dt->diff(new DateTime('2009-10-13'));
10
11var_dump($df,
12	$df->y,
13	$df->m,
14	$df->d,
15	$df->h,
16	$df->i,
17	$df->s,
18	$df->f,
19	$df->invert,
20	$df->days);
21
22?>
23==DONE==
24--EXPECTF--
25object(DateInterval)#%d (16) {
26  ["y"]=>
27  int(0)
28  ["m"]=>
29  int(0)
30  ["d"]=>
31  int(2)
32  ["h"]=>
33  int(0)
34  ["i"]=>
35  int(0)
36  ["s"]=>
37  int(0)
38  ["f"]=>
39  float(0)
40  ["weekday"]=>
41  int(0)
42  ["weekday_behavior"]=>
43  int(0)
44  ["first_last_day_of"]=>
45  int(0)
46  ["invert"]=>
47  int(0)
48  ["days"]=>
49  int(2)
50  ["special_type"]=>
51  int(0)
52  ["special_amount"]=>
53  int(0)
54  ["have_weekday_relative"]=>
55  int(0)
56  ["have_special_relative"]=>
57  int(0)
58}
59int(0)
60int(0)
61int(2)
62int(0)
63int(0)
64int(0)
65float(0)
66int(0)
67int(2)
68==DONE==
69