@@ -4,10 +4,83 @@ Test that there is no arginfo/zpp mismatch
4
4
<?php
5
5
6
6
function test ($ function ) {
7
+ if (false
8
+ /* expect input / hang */
9
+ || $ function === 'readline '
10
+ || $ function === 'readline_read_history '
11
+ || $ function === 'readline_write_history '
12
+ /* intentionally violate invariants */
13
+ || $ function === 'zend_create_unterminated_string '
14
+ || $ function === 'zend_test_array_return '
15
+ || $ function === 'zend_leak_bytes '
16
+ /* mess with output */
17
+ || (is_string ($ function ) && str_starts_with ($ function , 'ob_ ' ))
18
+ || $ function === 'output_add_rewrite_var '
19
+ || $ function === 'error_log '
20
+ /* may spend a lot of time waiting for connection timeouts */
21
+ || (is_string ($ function ) && str_contains ($ function , 'connect ' ))
22
+ || (is_string ($ function ) && str_starts_with ($ function , 'snmp ' ))
23
+ || (is_array ($ function ) && get_class ($ function [0 ]) === mysqli::class
24
+ && in_array ($ function [1 ], ['__construct ' , 'connect ' , 'real_connect ' ]))
25
+ /* misc */
26
+ || $ function === 'mail '
27
+ || $ function === 'mb_send_mail '
28
+ || $ function === 'pcntl_fork '
29
+ || $ function === 'posix_kill '
30
+ || $ function === 'posix_setrlimit '
31
+ || $ function === 'sapi_windows_generate_ctrl_event '
32
+ || $ function === 'imagegrabscreen '
33
+ ) {
34
+ return ;
35
+ }
36
+ if ($ function [0 ] instanceof SoapServer) {
37
+ /* TODO: Uses fatal errors */
38
+ return ;
39
+ }
40
+
41
+ ob_start ();
42
+ if (is_string ($ function )) {
43
+ echo "Testing $ function \n" ;
44
+ } else {
45
+ echo "Testing " . get_class ($ function [0 ]) . ":: $ function [1 ]\n" ;
46
+ }
47
+ try {
48
+ @$ function ();
49
+ } catch (Throwable ) {
50
+ }
51
+ try {
52
+ @$ function (null );
53
+ } catch (Throwable ) {
54
+ }
55
+ try {
56
+ @$ function (null , null );
57
+ } catch (Throwable ) {
58
+ }
59
+ try {
60
+ @$ function (null , null , null );
61
+ } catch (Throwable ) {
62
+ }
63
+ try {
64
+ @$ function (null , null , null , null );
65
+ } catch (Throwable ) {
66
+ }
67
+ try {
68
+ @$ function (null , null , null , null , null );
69
+ } catch (Throwable ) {
70
+ }
71
+ try {
72
+ @$ function (null , null , null , null , null , null );
73
+ } catch (Throwable ) {
74
+ }
75
+ try {
76
+ @$ function (null , null , null , null , null , null , null );
77
+ } catch (Throwable ) {
78
+ }
7
79
try {
8
80
@$ function (null , null , null , null , null , null , null , null );
9
81
} catch (Throwable ) {
10
82
}
83
+ ob_end_clean ();
11
84
}
12
85
13
86
foreach (get_defined_functions ()["internal " ] as $ function ) {
@@ -29,20 +102,6 @@ foreach (get_declared_classes() as $class) {
29
102
30
103
// var_dump() and debug_zval_dump() print all arguments
31
104
?>
105
+ ===DONE===
32
106
--EXPECT--
33
- NULL
34
- NULL
35
- NULL
36
- NULL
37
- NULL
38
- NULL
39
- NULL
40
- NULL
41
- NULL
42
- NULL
43
- NULL
44
- NULL
45
- NULL
46
- NULL
47
- NULL
48
- NULL
107
+ ===DONE===
0 commit comments