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--
22
23Warning: IntlGregorianCalendar::isLeapYear() expects exactly 1 parameter, 2 given in %s on line %d
24
25Warning: IntlGregorianCalendar::isLeapYear(): intlgregcal_is_leap_year: bad arguments in %s on line %d
26bool(false)
27
28Warning: IntlGregorianCalendar::isLeapYear() expects exactly 1 parameter, 0 given in %s on line %d
29
30Warning: IntlGregorianCalendar::isLeapYear(): intlgregcal_is_leap_year: bad arguments in %s on line %d
31bool(false)
32
33Warning: IntlGregorianCalendar::isLeapYear() expects parameter 1 to be long, string given in %s on line %d
34
35Warning: IntlGregorianCalendar::isLeapYear(): intlgregcal_is_leap_year: bad arguments in %s on line %d
36bool(false)
37
38Warning: intlgregcal_is_leap_year() expects exactly 2 parameters, 3 given in %s on line %d
39
40Warning: intlgregcal_is_leap_year(): intlgregcal_is_leap_year: bad arguments in %s on line %d
41bool(false)
42
43Warning: intlgregcal_is_leap_year() expects exactly 2 parameters, 1 given in %s on line %d
44
45Warning: intlgregcal_is_leap_year(): intlgregcal_is_leap_year: bad arguments in %s on line %d
46bool(false)
47
48Catchable fatal error: Argument 1 passed to intlgregcal_is_leap_year() must be an instance of IntlGregorianCalendar, integer given in %s on line %d
49