1--TEST-- 2IntlDateFormatter::getTimeZone(): bad args 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); 10ini_set("intl.default_locale", "pt_PT"); 11ini_set("date.timezone", 'Atlantic/Azores'); 12 13$df = new IntlDateFormatter(NULL, 0, 0); 14 15var_dump($df->getTimeZone(9)); 16var_dump(datefmt_get_timezone($df, 9)); 17var_dump(datefmt_get_timezone($df, 9)); 18var_dump(datefmt_get_timezone(new stdclass)); 19 20?> 21==DONE== 22--EXPECTF-- 23 24Warning: IntlDateFormatter::getTimeZone() expects exactly 0 parameters, 1 given in %s on line %d 25 26Warning: IntlDateFormatter::getTimeZone(): datefmt_get_timezone: unable to parse input params in %s on line %d 27bool(false) 28 29Warning: datefmt_get_timezone() expects exactly 1 parameter, 2 given in %s on line %d 30 31Warning: datefmt_get_timezone(): datefmt_get_timezone: unable to parse input params in %s on line %d 32bool(false) 33 34Warning: datefmt_get_timezone() expects exactly 1 parameter, 2 given in %s on line %d 35 36Warning: datefmt_get_timezone(): datefmt_get_timezone: unable to parse input params in %s on line %d 37bool(false) 38 39Warning: datefmt_get_timezone() expects parameter 1 to be IntlDateFormatter, object given in %s on line %d 40 41Warning: datefmt_get_timezone(): datefmt_get_timezone: unable to parse input params in %s on line %d 42bool(false) 43==DONE== 44