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