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