1--TEST-- 2IntlCalendar::set(): 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->set(1)); 16var_dump($c->set(1, 2, 3, 4)); 17var_dump($c->set(1, 2, 3, 4, 5, 6, 7)); 18var_dump($c->set(-1, 2)); 19 20var_dump(intlcal_set($c, -1, 2)); 21var_dump(intlcal_set(1, 2, 3)); 22--EXPECTF-- 23Warning: IntlCalendar::set() expects at least 2 parameters, 1 given in %s on line %d 24 25Warning: IntlCalendar::set(): intlcal_set: bad arguments in %s on line %d 26bool(false) 27 28Warning: IntlCalendar::set(): intlcal_set: bad arguments in %s on line %d 29bool(false) 30 31Warning: IntlCalendar::set(): intlcal_set: too many arguments in %s on line %d 32bool(false) 33 34Warning: IntlCalendar::set(): intlcal_set: invalid field in %s on line %d 35bool(false) 36 37Warning: intlcal_set(): intlcal_set: invalid field in %s on line %d 38bool(false) 39 40Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_set() must be an instance of IntlCalendar, integer given in %s:%d 41Stack trace: 42#0 %s(%d): intlcal_set(1, 2, 3) 43#1 {main} 44 thrown in %s on line %d 45