1--TEST--
2IntlTimeZone::getDisplayName(): locale parameter
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, '55.1') >= 0) die('skip for ICU < 55.1'); ?>
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_LONG));
17var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_LONG, NULL));
18var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_LONG, 'pt_PT'));
19
20?>
21==DONE==
22--EXPECT--
23string(30) "Western European Standard Time"
24string(30) "Western European Standard Time"
25string(32) "Hora Padrão da Europa Ocidental"
26==DONE==
27