1--TEST--
2Test DateTimeZone::listAbbreviations() function : basic functionality
3--FILE--
4<?php
5/* Prototype  : array DateTimeZone::listAbbreviations  ( void  )
6 * Description: Returns associative array containing dst, offset and the timezone name
7 * Source code: ext/date/php_date.c
8 * Alias to functions: timezone_abbreviations_list
9 */
10
11echo "*** Testing DateTimeZone::listAbbreviations() : basic functionality ***\n";
12
13//Set the default time zone
14date_default_timezone_set("GMT");
15
16$abbr = DateTimeZone::listAbbreviations();
17
18var_dump( gettype($abbr) );
19var_dump( count($abbr) );
20
21echo "\n-- Format a sample entry --\n";
22var_dump( $abbr["acst"] );
23
24?>
25===DONE===
26--EXPECTF--
27*** Testing DateTimeZone::listAbbreviations() : basic functionality ***
28string(5) "array"
29int(%d)
30
31-- Format a sample entry --
32array(12) {
33  [0]=>
34  array(3) {
35    ["dst"]=>
36    bool(false)
37    ["offset"]=>
38    int(32400)
39    ["timezone_id"]=>
40    string(18) "Australia/Adelaide"
41  }
42  [1]=>
43  array(3) {
44    ["dst"]=>
45    bool(false)
46    ["offset"]=>
47    int(34200)
48    ["timezone_id"]=>
49    string(18) "Australia/Adelaide"
50  }
51  [2]=>
52  array(3) {
53    ["dst"]=>
54    bool(false)
55    ["offset"]=>
56    int(32400)
57    ["timezone_id"]=>
58    string(21) "Australia/Broken_Hill"
59  }
60  [3]=>
61  array(3) {
62    ["dst"]=>
63    bool(false)
64    ["offset"]=>
65    int(32400)
66    ["timezone_id"]=>
67    string(16) "Australia/Darwin"
68  }
69  [4]=>
70  array(3) {
71    ["dst"]=>
72    bool(false)
73    ["offset"]=>
74    int(32400)
75    ["timezone_id"]=>
76    string(15) "Australia/North"
77  }
78  [5]=>
79  array(3) {
80    ["dst"]=>
81    bool(false)
82    ["offset"]=>
83    int(32400)
84    ["timezone_id"]=>
85    string(15) "Australia/South"
86  }
87  [6]=>
88  array(3) {
89    ["dst"]=>
90    bool(false)
91    ["offset"]=>
92    int(32400)
93    ["timezone_id"]=>
94    string(20) "Australia/Yancowinna"
95  }
96  [7]=>
97  array(3) {
98    ["dst"]=>
99    bool(false)
100    ["offset"]=>
101    int(34200)
102    ["timezone_id"]=>
103    string(21) "Australia/Broken_Hill"
104  }
105  [8]=>
106  array(3) {
107    ["dst"]=>
108    bool(false)
109    ["offset"]=>
110    int(34200)
111    ["timezone_id"]=>
112    string(16) "Australia/Darwin"
113  }
114  [9]=>
115  array(3) {
116    ["dst"]=>
117    bool(false)
118    ["offset"]=>
119    int(34200)
120    ["timezone_id"]=>
121    string(15) "Australia/North"
122  }
123  [10]=>
124  array(3) {
125    ["dst"]=>
126    bool(false)
127    ["offset"]=>
128    int(34200)
129    ["timezone_id"]=>
130    string(15) "Australia/South"
131  }
132  [11]=>
133  array(3) {
134    ["dst"]=>
135    bool(false)
136    ["offset"]=>
137    int(34200)
138    ["timezone_id"]=>
139    string(20) "Australia/Yancowinna"
140  }
141}
142===DONE===
143