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