1--TEST--
2IntlGregorianCalendar::setGregorianChange(): 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();
14var_dump($c->setGregorianChange());
15var_dump($c->setGregorianChange(1, 2));
16var_dump($c->setGregorianChange("sdfds"));
17
18var_dump(intlgregcal_set_gregorian_change($c));
19var_dump(intlgregcal_set_gregorian_change(1, 4.));
20--EXPECTF--
21Warning: IntlGregorianCalendar::setGregorianChange() expects exactly 1 parameter, 0 given in %s on line %d
22
23Warning: IntlGregorianCalendar::setGregorianChange(): intlgregcal_set_gregorian_change: bad arguments in %s on line %d
24bool(false)
25
26Warning: IntlGregorianCalendar::setGregorianChange() expects exactly 1 parameter, 2 given in %s on line %d
27
28Warning: IntlGregorianCalendar::setGregorianChange(): intlgregcal_set_gregorian_change: bad arguments in %s on line %d
29bool(false)
30
31Warning: IntlGregorianCalendar::setGregorianChange() expects parameter 1 to be float, string given in %s on line %d
32
33Warning: IntlGregorianCalendar::setGregorianChange(): intlgregcal_set_gregorian_change: bad arguments in %s on line %d
34bool(false)
35
36Warning: intlgregcal_set_gregorian_change() expects exactly 2 parameters, 1 given in %s on line %d
37
38Warning: intlgregcal_set_gregorian_change(): intlgregcal_set_gregorian_change: bad arguments in %s on line %d
39bool(false)
40
41Fatal error: Uncaught TypeError: Argument 1 passed to intlgregcal_set_gregorian_change() must be an instance of IntlGregorianCalendar, int given in %s:%d
42Stack trace:
43#0 %s(%d): intlgregcal_set_gregorian_change(1, 4)
44#1 {main}
45  thrown in %s on line %d
46