1--TEST--
2IntlGregorianCalendar::__construct(): bad arguments
3--EXTENSIONS--
4intl
5--FILE--
6<?php
7ini_set("intl.error_level", E_WARNING);
8
9try {
10    var_dump(intlgregcal_create_instance(1,2,3,4,5,6,7));
11} catch (ArgumentCountError $e) {
12    echo $e->getMessage(), "\n";
13}
14try {
15    var_dump(intlgregcal_create_instance(1,2,3,4,5,6,7,8));
16} catch (ArgumentCountError $e) {
17    echo $e->getMessage(), "\n";
18}
19try {
20    var_dump(intlgregcal_create_instance(1,2,3,4));
21} catch (ArgumentCountError $e) {
22    echo $e->getMessage(), "\n";
23}
24try {
25    var_dump(new IntlGregorianCalendar(1,2,NULL,4));
26} catch (ArgumentCountError $e) {
27    echo $e->getMessage(), "\n";
28}
29try {
30    var_dump(new IntlGregorianCalendar(1,2,3,4,5,array()));
31} catch (TypeError $e) {
32    echo $e->getMessage(), "\n";
33}
34
35$cal = new IntlGregorianCalendar();
36try {
37    $cal->__construct();
38} catch (Error $e) {
39    echo $e->getMessage(), "\n";
40}
41?>
42--EXPECTF--
43Deprecated: Function intlgregcal_create_instance() is deprecated since 8.4, use IntlGregorianCalendar::__construct(), IntlGregorianCalendar::createFromDate(), or IntlGregorianCalendar::createFromDateTime() instead in %s on line %d
44Too many arguments
45
46Deprecated: Function intlgregcal_create_instance() is deprecated since 8.4, use IntlGregorianCalendar::__construct(), IntlGregorianCalendar::createFromDate(), or IntlGregorianCalendar::createFromDateTime() instead in %s on line %d
47Too many arguments
48
49Deprecated: Function intlgregcal_create_instance() is deprecated since 8.4, use IntlGregorianCalendar::__construct(), IntlGregorianCalendar::createFromDate(), or IntlGregorianCalendar::createFromDateTime() instead in %s on line %d
50No variant with 4 arguments (excluding trailing NULLs)
51
52Deprecated: Calling IntlGregorianCalendar::__construct() with more than 2 arguments is deprecated, use either IntlGregorianCalendar::createFromDate() or IntlGregorianCalendar::createFromDateTime() instead in %s on line %d
53No variant with 4 arguments (excluding trailing NULLs)
54
55Deprecated: Calling IntlGregorianCalendar::__construct() with more than 2 arguments is deprecated, use either IntlGregorianCalendar::createFromDate() or IntlGregorianCalendar::createFromDateTime() instead in %s on line %d
56IntlGregorianCalendar::__construct(): Argument #6 ($second) must be of type int, array given
57IntlGregorianCalendar object is already constructed
58