1--TEST-- 2IntlTimeZone::getRegion(): errors 3--SKIPIF-- 4<?php 5if (!extension_loaded('intl')) 6 die('skip intl extension not enabled'); 7if (version_compare(INTL_ICU_VERSION, '4.8') < 0) 8 die('skip for ICU 4.8+'); 9--FILE-- 10<?php 11ini_set("intl.error_level", E_WARNING); 12 13var_dump(IntlTimeZone::getRegion()); 14var_dump(IntlTimeZone::getRegion(array())); 15var_dump(IntlTimeZone::getRegion('Europe/Lisbon', 4)); 16var_dump(IntlTimeZone::getRegion("foo\x81")); 17var_dump(IntlTimeZone::getRegion("foo")); 18 19 20 21--EXPECTF-- 22 23Warning: IntlTimeZone::getRegion() expects exactly 1 parameter, 0 given in %s on line %d 24 25Warning: IntlTimeZone::getRegion(): intltz_get_region: bad arguments in %s on line %d 26bool(false) 27 28Warning: IntlTimeZone::getRegion() expects parameter 1 to be string, array given in %s on line %d 29 30Warning: IntlTimeZone::getRegion(): intltz_get_region: bad arguments in %s on line %d 31bool(false) 32 33Warning: IntlTimeZone::getRegion() expects exactly 1 parameter, 2 given in %s on line %d 34 35Warning: IntlTimeZone::getRegion(): intltz_get_region: bad arguments in %s on line %d 36bool(false) 37 38Warning: IntlTimeZone::getRegion(): intltz_get_region: could not convert time zone id to UTF-16 in %s on line %d 39bool(false) 40 41Warning: IntlTimeZone::getRegion(): intltz_get_region: Error obtaining region in %s on line %d 42bool(false) 43