1--TEST-- 2IntlDateFormatter::getCalendarObject(): 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->getCalendarObject(9)); 16var_dump(datefmt_get_calendar_object($df, 9)); 17var_dump(datefmt_get_calendar_object($df, 9)); 18var_dump(datefmt_get_calendar_object(new stdclass)); 19 20?> 21==DONE== 22--EXPECTF-- 23Warning: IntlDateFormatter::getCalendarObject() expects exactly 0 parameters, 1 given in %s on line %d 24 25Warning: IntlDateFormatter::getCalendarObject(): datefmt_get_calendar_object: unable to parse input params in %s on line %d 26bool(false) 27 28Warning: datefmt_get_calendar_object() expects exactly 1 parameter, 2 given in %s on line %d 29 30Warning: datefmt_get_calendar_object(): datefmt_get_calendar_object: unable to parse input params in %s on line %d 31bool(false) 32 33Warning: datefmt_get_calendar_object() expects exactly 1 parameter, 2 given in %s on line %d 34 35Warning: datefmt_get_calendar_object(): datefmt_get_calendar_object: unable to parse input params in %s on line %d 36bool(false) 37 38Warning: datefmt_get_calendar_object() expects parameter 1 to be IntlDateFormatter, object given in %s on line %d 39 40Warning: datefmt_get_calendar_object(): datefmt_get_calendar_object: unable to parse input params in %s on line %d 41bool(false) 42==DONE== 43