1--TEST--
2Test timezone_abbreviations_list() function : basic functionality
3--FILE--
4<?php
5/* Prototype  : array timezone_abbreviations_list  ( 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: DateTimeZone::listAbbreviations
9 */
10
11echo "*** Testing timezone_abbreviations_list() : basic functionality ***\n";
12
13//Set the default time zone
14date_default_timezone_set("GMT");
15
16$abbr = timezone_abbreviations_list();
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 timezone_abbreviations_list() : basic functionality ***
28string(5) "array"
29int(%d)
30
31-- Format a sample entry --
32array(11) {
33  [0]=>
34  array(3) {
35    ["dst"]=>
36    bool(true)
37    ["offset"]=>
38    int(-14400)
39    ["timezone_id"]=>
40    string(18) "America/Porto_Acre"
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(true)
55    ["offset"]=>
56    int(-14400)
57    ["timezone_id"]=>
58    string(16) "America/Eirunepe"
59  }
60  [3]=>
61  array(3) {
62    ["dst"]=>
63    bool(true)
64    ["offset"]=>
65    int(-14400)
66    ["timezone_id"]=>
67    string(18) "America/Rio_Branco"
68  }
69  [4]=>
70  array(3) {
71    ["dst"]=>
72    bool(true)
73    ["offset"]=>
74    int(-14400)
75    ["timezone_id"]=>
76    string(11) "Brazil/Acre"
77  }
78  [5]=>
79  array(3) {
80    ["dst"]=>
81    bool(false)
82    ["offset"]=>
83    int(34200)
84    ["timezone_id"]=>
85    string(13) "Asia/Jayapura"
86  }
87  [6]=>
88  array(3) {
89    ["dst"]=>
90    bool(false)
91    ["offset"]=>
92    int(34200)
93    ["timezone_id"]=>
94    string(21) "Australia/Broken_Hill"
95  }
96  [7]=>
97  array(3) {
98    ["dst"]=>
99    bool(false)
100    ["offset"]=>
101    int(34200)
102    ["timezone_id"]=>
103    string(16) "Australia/Darwin"
104  }
105  [8]=>
106  array(3) {
107    ["dst"]=>
108    bool(false)
109    ["offset"]=>
110    int(34200)
111    ["timezone_id"]=>
112    string(15) "Australia/North"
113  }
114  [9]=>
115  array(3) {
116    ["dst"]=>
117    bool(false)
118    ["offset"]=>
119    int(34200)
120    ["timezone_id"]=>
121    string(15) "Australia/South"
122  }
123  [10]=>
124  array(3) {
125    ["dst"]=>
126    bool(false)
127    ["offset"]=>
128    int(34200)
129    ["timezone_id"]=>
130    string(20) "Australia/Yancowinna"
131  }
132}
133===DONE===
134