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(144)
30
31-- Format a sample entry --
32array(6) {
33  [0]=>
34  array(3) {
35    ["dst"]=>
36    bool(false)
37    ["offset"]=>
38    int(34200)
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(21) "Australia/Broken_Hill"
50  }
51  [2]=>
52  array(3) {
53    ["dst"]=>
54    bool(false)
55    ["offset"]=>
56    int(34200)
57    ["timezone_id"]=>
58    string(16) "Australia/Darwin"
59  }
60  [3]=>
61  array(3) {
62    ["dst"]=>
63    bool(false)
64    ["offset"]=>
65    int(34200)
66    ["timezone_id"]=>
67    string(15) "Australia/North"
68  }
69  [4]=>
70  array(3) {
71    ["dst"]=>
72    bool(false)
73    ["offset"]=>
74    int(34200)
75    ["timezone_id"]=>
76    string(15) "Australia/South"
77  }
78  [5]=>
79  array(3) {
80    ["dst"]=>
81    bool(false)
82    ["offset"]=>
83    int(34200)
84    ["timezone_id"]=>
85    string(20) "Australia/Yancowinna"
86  }
87}
88===DONE===
89