1--TEST--
2IntlTimeZone::getOffset(): errors
3--SKIPIF--
4<?php
5if (!extension_loaded('intl'))
6	die('skip intl extension not enabled');
7--FILE--
8<?php
9ini_set("intl.error_level", E_WARNING);
10
11$tz = IntlTimeZone::createTimeZone('Europe/Lisbon');
12var_dump($tz->getOffset(INF, true, $a, $a));
13var_dump($tz->getOffset(time()*1000, true, $a));
14var_dump($tz->getOffset(time()*1000, true, $a, $a, $a));
15
16intltz_get_offset(null, time()*1000, false, $a, $a);
17--EXPECTF--
18Warning: IntlTimeZone::getOffset(): intltz_get_offset: error obtaining offset in %s on line %d
19bool(false)
20
21Warning: IntlTimeZone::getOffset() expects exactly 4 parameters, 3 given in %s on line %d
22
23Warning: IntlTimeZone::getOffset(): intltz_get_offset: bad arguments in %s on line %d
24bool(false)
25
26Warning: IntlTimeZone::getOffset() expects exactly 4 parameters, 5 given in %s on line %d
27
28Warning: IntlTimeZone::getOffset(): intltz_get_offset: bad arguments in %s on line %d
29bool(false)
30
31Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_offset() must be an instance of IntlTimeZone, null given in %s:%d
32Stack trace:
33#0 %s(%d): intltz_get_offset(NULL, %d, false, NULL, NULL)
34#1 {main}
35  thrown in %s on line %d
36