1--TEST--
2IntlGregorianCalendar::__construct(): bad arguments
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);
10
11try {
12    var_dump(intlgregcal_create_instance(1,2,3,4,5,6,7));
13} catch (ArgumentCountError $e) {
14    echo $e->getMessage(), "\n";
15}
16try {
17    var_dump(intlgregcal_create_instance(1,2,3,4,5,6,7,8));
18} catch (ArgumentCountError $e) {
19    echo $e->getMessage(), "\n";
20}
21try {
22    var_dump(intlgregcal_create_instance(1,2,3,4));
23} catch (ArgumentCountError $e) {
24    echo $e->getMessage(), "\n";
25}
26try {
27    var_dump(new IntlGregorianCalendar(1,2,NULL,4));
28} catch (ArgumentCountError $e) {
29    echo $e->getMessage(), "\n";
30}
31try {
32    var_dump(new IntlGregorianCalendar(1,2,3,4,NULL,array()));
33} catch (TypeError $e) {
34    echo $e->getMessage(), "\n";
35}
36
37$cal = new IntlGregorianCalendar();
38try {
39    $cal->__construct();
40} catch (Error $e) {
41    echo $e->getMessage(), "\n";
42}
43?>
44--EXPECT--
45Too many arguments
46Too many arguments
47No variant with 4 arguments (excluding trailing NULLs)
48No variant with 4 arguments (excluding trailing NULLs)
49IntlGregorianCalendar::__construct(): Argument #6 ($second) must be of type int, array given
50IntlGregorianCalendar object is already constructed
51