1--TEST-- 2IntlCalendar::setTime(): bad arguments 3--INI-- 4date.timezone=Atlantic/Azores 5--SKIPIF-- 6<?php 7if (!extension_loaded('intl')) 8 die('skip intl extension not enabled'); 9--FILE-- 10<?php 11ini_set("intl.error_level", E_WARNING); 12 13$c = new IntlGregorianCalendar(NULL, 'pt_PT'); 14 15var_dump($c->setTime(1, 2)); 16var_dump($c->setTime("jjj")); 17 18var_dump(intlcal_set_time($c, 1, 2)); 19var_dump(intlcal_set_time(1)); 20--EXPECTF-- 21 22Warning: IntlCalendar::setTime() expects exactly 1 parameter, 2 given in %s on line %d 23 24Warning: IntlCalendar::setTime(): intlcal_set_time: bad arguments in %s on line %d 25bool(false) 26 27Warning: IntlCalendar::setTime() expects parameter 1 to be double, string given in %s on line %d 28 29Warning: IntlCalendar::setTime(): intlcal_set_time: bad arguments in %s on line %d 30bool(false) 31 32Warning: intlcal_set_time() expects exactly 2 parameters, 3 given in %s on line %d 33 34Warning: intlcal_set_time(): intlcal_set_time: bad arguments in %s on line %d 35bool(false) 36 37Catchable fatal error: Argument 1 passed to intlcal_set_time() must be an instance of IntlCalendar, integer given in %s on line %d 38