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