xref: /PHP-8.0/ext/date/tests/bug53437_var4.phpt (revision f8d79582)
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--EXPECTF--
24object(DateInterval)#%d (16) {
25  ["y"]=>
26  int(0)
27  ["m"]=>
28  int(0)
29  ["d"]=>
30  int(2)
31  ["h"]=>
32  int(0)
33  ["i"]=>
34  int(0)
35  ["s"]=>
36  int(0)
37  ["f"]=>
38  float(0)
39  ["weekday"]=>
40  int(0)
41  ["weekday_behavior"]=>
42  int(0)
43  ["first_last_day_of"]=>
44  int(0)
45  ["invert"]=>
46  int(0)
47  ["days"]=>
48  int(2)
49  ["special_type"]=>
50  int(0)
51  ["special_amount"]=>
52  int(0)
53  ["have_weekday_relative"]=>
54  int(0)
55  ["have_special_relative"]=>
56  int(0)
57}
58int(0)
59int(0)
60int(2)
61int(0)
62int(0)
63int(0)
64float(0)
65int(0)
66int(2)
67