1--TEST--
2IntlCalendar::isWeekend(): 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->isWeekend(1, 2));
16var_dump($c->isWeekend("jhhk"));
17
18var_dump(intlcal_is_weekend($c, "jj"));
19var_dump(intlcal_is_weekend(1));
20--EXPECTF--
21Warning: IntlCalendar::isWeekend() expects at most 1 parameter, 2 given in %s on line %d
22
23Warning: IntlCalendar::isWeekend(): intlcal_is_weekend: bad arguments in %s on line %d
24bool(false)
25
26Warning: IntlCalendar::isWeekend() expects parameter 1 to be float, string given in %s on line %d
27
28Warning: IntlCalendar::isWeekend(): intlcal_is_weekend: bad arguments in %s on line %d
29bool(false)
30
31Warning: intlcal_is_weekend() expects parameter 2 to be float, string given in %s on line %d
32
33Warning: intlcal_is_weekend(): intlcal_is_weekend: bad arguments in %s on line %d
34bool(false)
35
36Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_is_weekend() must be an instance of IntlCalendar, int given in %s:%d
37Stack trace:
38#0 %s(%d): intlcal_is_weekend(1)
39#1 {main}
40  thrown in %s on line %d
41