1--TEST-- 2IntlTimeZone::getDisplayName(): type parameter (ICU >= 49 && ICU < 51.2) 3--SKIPIF-- 4<?php if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?> 5<?php if (version_compare(INTL_ICU_VERSION, '49') < 0) die('skip for ICU 49+'); ?> 6<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?> 7--FILE-- 8<?php 9ini_set("intl.error_level", E_WARNING); 10ini_set("error_reporting", -1); 11ini_set("display_errors", 1); 12 13$lsb = IntlTimeZone::createTimeZone('Europe/Lisbon'); 14 15ini_set('intl.default_locale', 'en_US'); 16var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_SHORT)); 17var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_LONG)); 18var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_SHORT_GENERIC)); 19var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_LONG_GENERIC)); 20var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_SHORT_GMT)); 21var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_LONG_GMT)); 22var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_SHORT_COMMONLY_USED)); 23var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_GENERIC_LOCATION)); 24 25?> 26==DONE== 27--EXPECT-- 28string(3) "GMT" 29string(30) "Western European Standard Time" 30string(22) "Portugal Time (Lisbon)" 31string(21) "Western European Time" 32string(5) "+0000" 33string(3) "GMT" 34string(3) "GMT" 35string(22) "Portugal Time (Lisbon)" 36==DONE== 37