xref: /PHP-8.2/ext/date/tests/bug53437_var4.phpt (revision c8a6a8ab)
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 (%d) {
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  ["invert"]=>
40  int(0)
41  ["days"]=>
42  int(2)
43  ["from_string"]=>
44  bool(false)
45}
46int(0)
47int(0)
48int(2)
49int(0)
50int(0)
51int(0)
52float(0)
53int(0)
54int(2)
55