1--TEST--
2IntlCalendar::createInstance() argument variations
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", "nl");
11
12date_default_timezone_set('Europe/Amsterdam');
13
14$cal = intlcal_create_instance('Europe/Amsterdam');
15print_R($cal->getTimeZone());
16print_R($cal->getLocale(Locale::ACTUAL_LOCALE));
17echo "\n";
18
19$cal = intlcal_create_instance('Europe/Lisbon', null);
20print_R($cal->getTimeZone());
21print_R($cal->getLocale(Locale::ACTUAL_LOCALE));
22echo "\n";
23
24$cal = intlcal_create_instance(IntlTimeZone::createTimeZone('Europe/Lisbon'));
25print_R($cal->getTimeZone());
26print_R($cal->getLocale(Locale::ACTUAL_LOCALE));
27echo "\n";
28
29$cal = intlcal_create_instance(null, "pt");
30print_R($cal->getTimeZone());
31print_R($cal->getLocale(Locale::ACTUAL_LOCALE));
32echo "\n";
33
34$cal = intlcal_create_instance("Europe/Lisbon", "pt");
35print_R($cal->getTimeZone());
36print_R($cal->getLocale(Locale::ACTUAL_LOCALE));
37echo "\n";
38
39?>
40==DONE==
41--EXPECTF--
42IntlTimeZone Object
43(
44    [valid] => 1
45    [id] => Europe/Amsterdam
46    [rawOffset] => 3600000
47    [currentOffset] => %d
48)
49nl
50IntlTimeZone Object
51(
52    [valid] => 1
53    [id] => Europe/Lisbon
54    [rawOffset] => 0
55    [currentOffset] => %d
56)
57nl
58IntlTimeZone Object
59(
60    [valid] => 1
61    [id] => Europe/Lisbon
62    [rawOffset] => 0
63    [currentOffset] => %d
64)
65nl
66IntlTimeZone Object
67(
68    [valid] => 1
69    [id] => Europe/Amsterdam
70    [rawOffset] => 3600000
71    [currentOffset] => %d
72)
73pt
74IntlTimeZone Object
75(
76    [valid] => 1
77    [id] => Europe/Lisbon
78    [rawOffset] => 0
79    [currentOffset] => %d
80)
81pt
82==DONE==
83