1--TEST-- 2IntlCalendar::clear(): 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->clear(1, 2)); 16var_dump($c->clear(-1)); 17 18var_dump(intlcal_clear($c, -1)); 19var_dump(intlcal_clear(1, 2)); 20--EXPECTF-- 21 22Warning: IntlCalendar::clear(): intlcal_clear: too many arguments in %s on line %d 23bool(false) 24 25Warning: IntlCalendar::clear(): intlcal_clear: invalid field in %s on line %d 26bool(false) 27 28Warning: intlcal_clear(): intlcal_clear: invalid field in %s on line %d 29bool(false) 30 31Catchable fatal error: Argument 1 passed to intlcal_clear() must be an instance of IntlCalendar, integer given in %s on line %d 32