xref: /PHP-8.1/ext/date/tests/bug45682.phpt (revision 7aacc705)
1--TEST--
2Bug #45682 (Unable to var_dump(DateInterval))
3--INI--
4date.timezone=UTC
5--FILE--
6<?php
7
8$date = new DateTime("28-July-2008");
9$other = new DateTime("31-July-2008");
10
11$diff = date_diff($date, $other);
12
13var_dump($diff);
14?>
15--EXPECTF--
16object(DateInterval)#%d (16) {
17  ["y"]=>
18  int(0)
19  ["m"]=>
20  int(0)
21  ["d"]=>
22  int(3)
23  ["h"]=>
24  int(0)
25  ["i"]=>
26  int(0)
27  ["s"]=>
28  int(0)
29  ["f"]=>
30  float(0)
31  ["weekday"]=>
32  int(0)
33  ["weekday_behavior"]=>
34  int(0)
35  ["first_last_day_of"]=>
36  int(0)
37  ["invert"]=>
38  int(0)
39  ["days"]=>
40  int(3)
41  ["special_type"]=>
42  int(0)
43  ["special_amount"]=>
44  int(0)
45  ["have_weekday_relative"]=>
46  int(0)
47  ["have_special_relative"]=>
48  int(0)
49}
50