1--TEST--
2IntlTimeZone::getWindowsID basic test
3--SKIPIF--
4<?php
5if (!extension_loaded('intl'))
6	die('skip intl extension not enabled'); ?>
7<?php if (version_compare(INTL_ICU_VERSION, '58.1') < 0) die('skip for ICU >= 58.1'); ?>
8--FILE--
9<?php
10
11$tzs = array(
12  'America/Bogota',
13  'America/Havana',
14  'America/Indiana/Knox',
15  'America/Los_Angeles',
16  'Azeroth/Kalimdor/Durotar',
17  'Africa/Casablanca',
18  'Asia/Singapore',
19  'Australia/Perth',
20  'Europe/London',
21  'Europe/Istanbul',
22);
23
24foreach ($tzs as $tz) {
25  var_dump(IntlTimeZone::getWindowsID($tz));
26  if (intl_get_error_code() != U_ZERO_ERROR) {
27    echo "Error: ", intl_get_error_message(), "\n";
28  }
29}
30--EXPECT--
31string(24) "SA Pacific Standard Time"
32string(18) "Cuba Standard Time"
33string(21) "Central Standard Time"
34string(21) "Pacific Standard Time"
35bool(false)
36Error: intltz_get_windows_id: Unknown system timezone: U_ILLEGAL_ARGUMENT_ERROR
37string(21) "Morocco Standard Time"
38string(23) "Singapore Standard Time"
39string(26) "W. Australia Standard Time"
40string(17) "GMT Standard Time"
41string(20) "Turkey Standard Time"
42