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