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
18--EXPECTF--
19
20Warning: IntlTimeZone::getOffset(): intltz_get_offset: error obtaining offset in %s on line %d
21bool(false)
22
23Warning: IntlTimeZone::getOffset() expects exactly 4 parameters, 3 given in %s on line %d
24
25Warning: IntlTimeZone::getOffset(): intltz_get_offset: bad arguments in %s on line %d
26bool(false)
27
28Warning: IntlTimeZone::getOffset() expects exactly 4 parameters, 5 given in %s on line %d
29
30Warning: IntlTimeZone::getOffset(): intltz_get_offset: bad arguments in %s on line %d
31bool(false)
32
33Catchable fatal error: Argument 1 passed to intltz_get_offset() must be an instance of IntlTimeZone, null given in %s on line %d
34