1--TEST--
2IntlCalendar::equals(): 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
15function eh($errno, $errstr) {
16echo "error: $errno, $errstr\n";
17}
18set_error_handler('eh');
19
20var_dump($c->equals());
21var_dump($c->equals(new stdclass));
22var_dump($c->equals(1, 2));
23
24var_dump(intlcal_equals($c, array()));
25var_dump(intlcal_equals(1, $c));
26
27--EXPECT--
28error: 2, IntlCalendar::equals() expects exactly 1 parameter, 0 given
29error: 2, IntlCalendar::equals(): intlcal_equals: bad arguments
30bool(false)
31error: 4096, Argument 1 passed to IntlCalendar::equals() must be an instance of IntlCalendar, instance of stdClass given
32error: 2, IntlCalendar::equals() expects parameter 1 to be IntlCalendar, object given
33error: 2, IntlCalendar::equals(): intlcal_equals: bad arguments
34bool(false)
35error: 4096, Argument 1 passed to IntlCalendar::equals() must be an instance of IntlCalendar, integer given
36error: 2, IntlCalendar::equals() expects exactly 1 parameter, 2 given
37error: 2, IntlCalendar::equals(): intlcal_equals: bad arguments
38bool(false)
39error: 4096, Argument 2 passed to intlcal_equals() must be an instance of IntlCalendar, array given
40error: 2, intlcal_equals() expects parameter 2 to be IntlCalendar, array given
41error: 2, intlcal_equals(): intlcal_equals: bad arguments
42bool(false)
43error: 4096, Argument 1 passed to intlcal_equals() must be an instance of IntlCalendar, integer given
44error: 2, intlcal_equals() expects parameter 1 to be IntlCalendar, integer given
45error: 2, intlcal_equals(): intlcal_equals: bad arguments
46bool(false)
47