xref: /PHP-8.2/ext/date/tests/008.phpt (revision 852485d8)
1--TEST--
2getdate() tests
3--FILE--
4<?php
5date_default_timezone_set('UTC');
6
7$t = mktime(0,0,0, 6, 27, 2006);
8
9var_dump(getdate($t));
10var_dump(getdate());
11
12echo "Done\n";
13?>
14--EXPECTF--
15array(11) {
16  ["seconds"]=>
17  int(0)
18  ["minutes"]=>
19  int(0)
20  ["hours"]=>
21  int(0)
22  ["mday"]=>
23  int(27)
24  ["wday"]=>
25  int(2)
26  ["mon"]=>
27  int(6)
28  ["year"]=>
29  int(2006)
30  ["yday"]=>
31  int(177)
32  ["weekday"]=>
33  string(7) "Tuesday"
34  ["month"]=>
35  string(4) "June"
36  [0]=>
37  int(1151366400)
38}
39array(11) {
40  ["seconds"]=>
41  int(%d)
42  ["minutes"]=>
43  int(%d)
44  ["hours"]=>
45  int(%d)
46  ["mday"]=>
47  int(%d)
48  ["wday"]=>
49  int(%d)
50  ["mon"]=>
51  int(%d)
52  ["year"]=>
53  int(%d)
54  ["yday"]=>
55  int(%d)
56  ["weekday"]=>
57  string(%d) "%s"
58  ["month"]=>
59  string(%d) "%s"
60  [0]=>
61  int(%d)
62}
63Done
64