1--TEST-- 2Test DateTimeZone::listAbbreviations() function : basic functionality 3--FILE-- 4<?php 5echo "*** Testing DateTimeZone::listAbbreviations() : basic functionality ***\n"; 6 7//Set the default time zone 8date_default_timezone_set("GMT"); 9 10$abbr = DateTimeZone::listAbbreviations(); 11 12var_dump( gettype($abbr) ); 13var_dump( count($abbr) ); 14 15echo "\n-- Format a sample entry --\n"; 16var_dump( $abbr["acst"] ); 17 18?> 19--EXPECT-- 20*** Testing DateTimeZone::listAbbreviations() : basic functionality *** 21string(5) "array" 22int(144) 23 24-- Format a sample entry -- 25array(6) { 26 [0]=> 27 array(3) { 28 ["dst"]=> 29 bool(false) 30 ["offset"]=> 31 int(34200) 32 ["timezone_id"]=> 33 string(18) "Australia/Adelaide" 34 } 35 [1]=> 36 array(3) { 37 ["dst"]=> 38 bool(false) 39 ["offset"]=> 40 int(34200) 41 ["timezone_id"]=> 42 string(21) "Australia/Broken_Hill" 43 } 44 [2]=> 45 array(3) { 46 ["dst"]=> 47 bool(false) 48 ["offset"]=> 49 int(34200) 50 ["timezone_id"]=> 51 string(16) "Australia/Darwin" 52 } 53 [3]=> 54 array(3) { 55 ["dst"]=> 56 bool(false) 57 ["offset"]=> 58 int(34200) 59 ["timezone_id"]=> 60 string(15) "Australia/North" 61 } 62 [4]=> 63 array(3) { 64 ["dst"]=> 65 bool(false) 66 ["offset"]=> 67 int(34200) 68 ["timezone_id"]=> 69 string(15) "Australia/South" 70 } 71 [5]=> 72 array(3) { 73 ["dst"]=> 74 bool(false) 75 ["offset"]=> 76 int(34200) 77 ["timezone_id"]=> 78 string(20) "Australia/Yancowinna" 79 } 80} 81