xref: /PHP-5.5/ext/date/tests/bug45682.phpt (revision 0f9cf353)
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 (15) {
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  ["weekday"]=>
29  int(0)
30  ["weekday_behavior"]=>
31  int(0)
32  ["first_last_day_of"]=>
33  int(0)
34  ["invert"]=>
35  int(0)
36  ["days"]=>
37  int(3)
38  ["special_type"]=>
39  int(0)
40  ["special_amount"]=>
41  int(0)
42  ["have_weekday_relative"]=>
43  int(0)
44  ["have_special_relative"]=>
45  int(0)
46}
47