1--TEST--
2IntlGregorianCalendar::__construct(): basic
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$intlcal = intlgregcal_create_instance();
15var_dump($intlcal->getTimeZone()->getId());
16var_dump($intlcal->getLocale(1));
17
18$intlcal = new IntlGregorianCalendar('Europe/Lisbon', NULL);
19var_dump($intlcal->getTimeZone()->getId());
20var_dump($intlcal->getLocale(1));
21
22$intlcal = new IntlGregorianCalendar(NULL, 'pt_PT');
23var_dump($intlcal->getTimeZone()->getId());
24var_dump($intlcal->getLocale(1));
25
26$intlcal = new IntlGregorianCalendar('Europe/Lisbon', 'pt_PT');
27var_dump($intlcal->getTimeZone()->getId());
28var_dump($intlcal->getLocale(1));
29
30$intlcal = new IntlGregorianCalendar('Europe/Paris', 'fr_CA', NULL, NULL, NULL, NULL);
31var_dump($intlcal->getTimeZone()->getId());
32var_dump($intlcal->getLocale(1));
33
34var_dump($intlcal->getType());
35?>
36--EXPECT--
37string(16) "Europe/Amsterdam"
38string(5) "nl_NL"
39string(13) "Europe/Lisbon"
40string(5) "nl_NL"
41string(16) "Europe/Amsterdam"
42string(5) "pt_PT"
43string(13) "Europe/Lisbon"
44string(5) "pt_PT"
45string(12) "Europe/Paris"
46string(5) "fr_CA"
47string(9) "gregorian"
48