1--TEST--
2IntlTimeZone::getDisplayName(): errors
3--SKIPIF--
4<?php
5if (!extension_loaded('intl'))
6    die('skip intl extension not enabled');
7--FILE--
8<?php
9ini_set("intl.error_level", E_WARNING);
10
11$tz = IntlTimeZone::createTimeZone('Europe/Lisbon');
12var_dump($tz->getDisplayName(false, -1));
13
14var_dump(intltz_get_display_name(null, IntlTimeZone::DISPLAY_SHORT, false, 'pt_PT'));
15?>
16--EXPECTF--
17Warning: IntlTimeZone::getDisplayName(): intltz_get_display_name: wrong display type in %s on line %d
18bool(false)
19
20Fatal error: Uncaught TypeError: intltz_get_display_name(): Argument #1 ($timezone) must be of type IntlTimeZone, null given in %s:%d
21Stack trace:
22#0 %s(%d): intltz_get_display_name(NULL, 1, false, 'pt_PT')
23#1 {main}
24  thrown in %s on line %d
25