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