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