xref: /PHP-7.1/ext/date/tests/bug45682.phpt (revision 55626549)
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--EXPECTF--
15object(DateInterval)#%d (16) {
16  ["y"]=>
17  int(0)
18  ["m"]=>
19  int(0)
20  ["d"]=>
21  int(3)
22  ["h"]=>
23  int(0)
24  ["i"]=>
25  int(0)
26  ["s"]=>
27  int(0)
28  ["f"]=>
29  float(0)
30  ["weekday"]=>
31  int(0)
32  ["weekday_behavior"]=>
33  int(0)
34  ["first_last_day_of"]=>
35  int(0)
36  ["invert"]=>
37  int(0)
38  ["days"]=>
39  int(3)
40  ["special_type"]=>
41  int(0)
42  ["special_amount"]=>
43  int(0)
44  ["have_weekday_relative"]=>
45  int(0)
46  ["have_special_relative"]=>
47  int(0)
48}
49