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--
21Warning: IntlCalendar::clear() expects at most 1 parameter, 2 given in %s on line %d
22
23Warning: IntlCalendar::clear(): intlcal_clear: bad arguments in %s on line %d
24bool(false)
25
26Warning: IntlCalendar::clear(): intlcal_clear: invalid field in %s on line %d
27bool(false)
28
29Warning: intlcal_clear(): intlcal_clear: invalid field in %s on line %d
30bool(false)
31
32Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_clear() must be an instance of IntlCalendar, int given in %s:%d
33Stack trace:
34#0 %s(%d): intlcal_clear(1, 2)
35#1 {main}
36  thrown in %s on line %d
37