1--TEST--
2Test DateTimeZone class registration
3--FILE--
4<?php
5
6echo "*** Verify DateTimeZone class ***\n";
7
8echo "Verify DateTimeZone class registered OK\n";
9$class = new ReflectionClass('DateTimeZone');
10var_dump($class);
11
12echo "..and get names of all its methods\n";
13$methods = $class->getMethods();
14var_dump($methods);
15
16echo "..and get names of all its class constants\n";
17$constants = $class->getConstants();
18var_dump($constants);
19?>
20===DONE===
21--EXPECTF--
22*** Verify DateTimeZone class ***
23Verify DateTimeZone class registered OK
24object(ReflectionClass)#%d (1) {
25  ["name"]=>
26  string(12) "DateTimeZone"
27}
28..and get names of all its methods
29array(9) {
30  [0]=>
31  object(ReflectionMethod)#%d (2) {
32    ["name"]=>
33    string(11) "__construct"
34    ["class"]=>
35    string(12) "DateTimeZone"
36  }
37  [1]=>
38  object(ReflectionMethod)#%d (2) {
39    ["name"]=>
40    string(8) "__wakeup"
41    ["class"]=>
42    string(12) "DateTimeZone"
43  }
44  [2]=>
45  object(ReflectionMethod)#%d (2) {
46    ["name"]=>
47    string(11) "__set_state"
48    ["class"]=>
49    string(12) "DateTimeZone"
50  }
51  [3]=>
52  object(ReflectionMethod)#%d (2) {
53    ["name"]=>
54    string(7) "getName"
55    ["class"]=>
56    string(12) "DateTimeZone"
57  }
58  [4]=>
59  object(ReflectionMethod)#%d (2) {
60    ["name"]=>
61    string(9) "getOffset"
62    ["class"]=>
63    string(12) "DateTimeZone"
64  }
65  [5]=>
66  object(ReflectionMethod)#%d (2) {
67    ["name"]=>
68    string(14) "getTransitions"
69    ["class"]=>
70    string(12) "DateTimeZone"
71  }
72  [6]=>
73  object(ReflectionMethod)#%d (2) {
74    ["name"]=>
75    string(11) "getLocation"
76    ["class"]=>
77    string(12) "DateTimeZone"
78  }
79  [7]=>
80  object(ReflectionMethod)#%d (2) {
81    ["name"]=>
82    string(17) "listAbbreviations"
83    ["class"]=>
84    string(12) "DateTimeZone"
85  }
86  [8]=>
87  object(ReflectionMethod)#%d (2) {
88    ["name"]=>
89    string(15) "listIdentifiers"
90    ["class"]=>
91    string(12) "DateTimeZone"
92  }
93}
94..and get names of all its class constants
95array(14) {
96  ["AFRICA"]=>
97  int(1)
98  ["AMERICA"]=>
99  int(2)
100  ["ANTARCTICA"]=>
101  int(4)
102  ["ARCTIC"]=>
103  int(8)
104  ["ASIA"]=>
105  int(16)
106  ["ATLANTIC"]=>
107  int(32)
108  ["AUSTRALIA"]=>
109  int(64)
110  ["EUROPE"]=>
111  int(128)
112  ["INDIAN"]=>
113  int(256)
114  ["PACIFIC"]=>
115  int(512)
116  ["UTC"]=>
117  int(1024)
118  ["ALL"]=>
119  int(2047)
120  ["ALL_WITH_BC"]=>
121  int(4095)
122  ["PER_COUNTRY"]=>
123  int(4096)
124}
125===DONE===
126