1--TEST--
2IntlTimeZone::getIanaID
3--EXTENSIONS--
4intl
5--SKIPIF--
6<?php if (version_compare(INTL_ICU_VERSION, '74.0') < 0) die('skip for ICU >= 74.0'); ?>
7--FILE--
8<?php
9ini_set("intl.error_level", E_WARNING);
10
11var_dump(IntlTimeZone::getIanaID("php\x81"));
12var_dump(IntlTimeZone::getIanaID("Galaxy/Pluto"));
13var_dump(IntlTimeZone::getIanaID('Europe/Dublin'));
14var_dump(IntlTimeZone::getIanaID('Asia/Calcutta'));
15var_dump(intltz_get_iana_id('Asia/Calcutta') === IntlTimeZone::getIanaID('Asia/Calcutta'));
16?>
17--EXPECTF--
18Warning: IntlTimeZone::getIanaID(): could not convert time zone id to UTF-16 in %s on line %d
19bool(false)
20
21Warning: IntlTimeZone::getIanaID(): error obtaining IANA ID in %s on line %d
22bool(false)
23string(13) "Europe/Dublin"
24string(12) "Asia/Kolkata"
25bool(true)
26