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-- 21Warning: IntlCalendar::setTime() expects exactly 1 parameter, 2 given in %s on line %d 22 23Warning: IntlCalendar::setTime(): intlcal_set_time: bad arguments in %s on line %d 24bool(false) 25 26Warning: IntlCalendar::setTime() expects parameter 1 to be float, string given in %s on line %d 27 28Warning: IntlCalendar::setTime(): intlcal_set_time: bad arguments in %s on line %d 29bool(false) 30 31Warning: intlcal_set_time() expects exactly 2 parameters, 3 given in %s on line %d 32 33Warning: intlcal_set_time(): intlcal_set_time: bad arguments in %s on line %d 34bool(false) 35 36Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_set_time() must be an instance of IntlCalendar, int given in %s:%d 37Stack trace: 38#0 %s(%d): intlcal_set_time(1) 39#1 {main} 40 thrown in %s on line %d 41