1--TEST--
2IntlGregorianCalendar::__construct(): basic
3--SKIPIF--
4<?php
5if (!extension_loaded('intl'))
6	die('skip intl extension not enabled');
7if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
8	die('skip for ICU 4.8+');
9--FILE--
10<?php
11ini_set("intl.error_level", E_WARNING);
12ini_set("intl.default_locale", "nl");
13
14date_default_timezone_set('Europe/Amsterdam');
15
16$intlcal = intlgregcal_create_instance();
17var_dump($intlcal->getTimeZone()->getId());
18var_dump($intlcal->getLocale(1));
19
20$intlcal = new IntlGregorianCalendar('Europe/Lisbon', NULL);
21var_dump($intlcal->getTimeZone()->getId());
22var_dump($intlcal->getLocale(1));
23
24$intlcal = new IntlGregorianCalendar(NULL, 'pt_PT');
25var_dump($intlcal->getTimeZone()->getId());
26var_dump($intlcal->getLocale(1));
27
28$intlcal = new IntlGregorianCalendar('Europe/Lisbon', 'pt_PT');
29var_dump($intlcal->getTimeZone()->getId());
30var_dump($intlcal->getLocale(1));
31
32$intlcal = new IntlGregorianCalendar('Europe/Paris', 'fr_CA', NULL, NULL, NULL, NULL);
33var_dump($intlcal->getTimeZone()->getId());
34var_dump($intlcal->getLocale(1));
35
36var_dump($intlcal->getType());
37?>
38==DONE==
39--EXPECT--
40string(16) "Europe/Amsterdam"
41string(5) "nl_NL"
42string(13) "Europe/Lisbon"
43string(5) "nl_NL"
44string(16) "Europe/Amsterdam"
45string(5) "pt_PT"
46string(13) "Europe/Lisbon"
47string(5) "pt_PT"
48string(12) "Europe/Paris"
49string(5) "fr_CA"
50string(9) "gregorian"
51==DONE==
51