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