1--TEST--
2Test that there is no arginfo/zpp mismatch in strict mode
3--SKIPIF--
4<?php
5if (getenv('SKIP_ASAN')) die("skip Intermittently crashes lsan");
6if (getenv('SKIP_MSAN')) die("skip msan misses interceptors for some functions");
7?>
8--FILE--
9<?php
10
11declare(strict_types=1);
12
13require __DIR__ . "/arginfo_zpp_mismatch.inc";
14
15function test($function) {
16    if (skipFunction($function)) {
17        return;
18    }
19
20    ob_start();
21    if (is_string($function)) {
22        echo "Testing $function\n";
23    } else {
24        echo "Testing " . get_class($function[0]) . "::$function[1]\n";
25    }
26    try {
27        @$function();
28    } catch (Throwable) {
29    }
30    try {
31        @$function(null);
32    } catch (Throwable) {
33    }
34    try {
35        @$function(null, null);
36    } catch (Throwable) {
37    }
38    try {
39        @$function(null, null, null);
40    } catch (Throwable) {
41    }
42    try {
43        @$function(null, null, null, null);
44    } catch (Throwable) {
45    }
46    try {
47        @$function(null, null, null, null, null);
48    } catch (Throwable) {
49    }
50    try {
51        @$function(null, null, null, null, null, null);
52    } catch (Throwable) {
53    }
54    try {
55        @$function(null, null, null, null, null, null, null);
56    } catch (Throwable) {
57    }
58    try {
59        @$function(null, null, null, null, null, null, null, null);
60    } catch (Throwable) {
61    }
62    ob_end_clean();
63}
64
65foreach (get_defined_functions()["internal"] as $function) {
66    test($function);
67}
68
69foreach (get_declared_classes() as $class) {
70    try {
71        $rc = new ReflectionClass($class);
72        $obj = $rc->newInstanceWithoutConstructor();
73    } catch (Throwable) {
74        continue;
75    }
76
77    foreach (get_class_methods($class) as $method) {
78        test([$obj, $method]);
79    }
80}
81
82// var_dump() and debug_zval_dump() print all arguments
83?>
84===DONE===
85--EXPECT--
86===DONE===
87