1--TEST--
2IntlDateFormatter::__construct(): bad timezone or calendar
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);
10ini_set("intl.default_locale", "pt_PT");
11ini_set("date.timezone", 'Atlantic/Azores');
12
13var_dump(new IntlDateFormatter(NULL, 0, 0, 'bad timezone'));
14
15var_dump(new IntlDateFormatter(NULL, 0, 0, NULL, 3));
16
17var_dump(new IntlDateFormatter(NULL, 0, 0, NULL, new stdclass));
18
19
20?>
21==DONE==
22--EXPECTF--
23
24Warning: IntlDateFormatter::__construct(): datefmt_create: no such time zone: 'bad timezone' in %s on line %d
25NULL
26
27Warning: IntlDateFormatter::__construct(): datefmt_create: invalid value for calendar type; it must be one of IntlDateFormatter::TRADITIONAL (locale's default calendar) or IntlDateFormatter::GREGORIAN. Alternatively, it can be an IntlCalendar object in %s on line %d
28NULL
29
30Warning: IntlDateFormatter::__construct(): datefmt_create: Invalid calendar argument; should be an integer or an IntlCalendar instance in %s on line %d
31NULL
32==DONE==
33