xref: /PHP-8.3/ext/date/tests/bug45682.phpt (revision c8a6a8ab)
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 (%d) {
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  ["invert"]=>
32  int(0)
33  ["days"]=>
34  int(3)
35  ["from_string"]=>
36  bool(false)
37}
38