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(array())); 13var_dump($tz->getDisplayName(false, array())); 14var_dump($tz->getDisplayName(false, -1)); 15var_dump($tz->getDisplayName(false, IntlTimeZone::DISPLAY_SHORT, array())); 16var_dump($tz->getDisplayName(false, IntlTimeZone::DISPLAY_SHORT, NULL, NULL)); 17 18var_dump(intltz_get_display_name(null, IntlTimeZone::DISPLAY_SHORT, false, 'pt_PT')); 19 20--EXPECTF-- 21 22Warning: IntlTimeZone::getDisplayName() expects parameter 1 to be boolean, array given in %s on line %d 23 24Warning: IntlTimeZone::getDisplayName(): intltz_get_display_name: bad arguments in %s on line %d 25bool(false) 26 27Warning: IntlTimeZone::getDisplayName() expects parameter 2 to be long, array given in %s on line %d 28 29Warning: IntlTimeZone::getDisplayName(): intltz_get_display_name: bad arguments in %s on line %d 30bool(false) 31 32Warning: IntlTimeZone::getDisplayName(): intltz_get_display_name: wrong display type in %s on line %d 33bool(false) 34 35Warning: IntlTimeZone::getDisplayName() expects parameter 3 to be string, array given in %s on line %d 36 37Warning: IntlTimeZone::getDisplayName(): intltz_get_display_name: bad arguments in %s on line %d 38bool(false) 39 40Warning: IntlTimeZone::getDisplayName() expects at most 3 parameters, 4 given in %s on line %d 41 42Warning: IntlTimeZone::getDisplayName(): intltz_get_display_name: bad arguments in %s on line %d 43bool(false) 44 45Catchable fatal error: Argument 1 passed to intltz_get_display_name() must be an instance of IntlTimeZone, null given in %s on line %d 46