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