forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharginfo_zpp_mismatch.inc
44 lines (42 loc) · 1.54 KB
/
arginfo_zpp_mismatch.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
function skipFunction($function): bool {
if (false
/* expect input / hang */
|| $function === 'readline'
|| $function === 'readline_read_history'
|| $function === 'readline_write_history'
/* terminates script */
|| $function === 'exit'
|| $function === 'die'
/* intentionally violate invariants */
|| $function === 'zend_create_unterminated_string'
|| $function === 'zend_test_array_return'
|| $function === 'zend_test_crash'
|| $function === 'zend_leak_bytes'
/* mess with output */
|| (is_string($function) && str_starts_with($function, 'ob_'))
|| $function === 'output_add_rewrite_var'
|| $function === 'error_log'
/* may spend a lot of time waiting for connection timeouts */
|| (is_string($function) && str_contains($function, 'connect'))
|| (is_string($function) && str_starts_with($function, 'snmp'))
|| (is_array($function) && get_class($function[0]) === mysqli::class
&& in_array($function[1], ['__construct', 'connect', 'real_connect']))
/* misc */
|| $function === 'mail'
|| $function === 'mb_send_mail'
|| $function === 'pcntl_fork'
|| $function === 'pcntl_rfork'
|| $function === 'posix_kill'
|| $function === 'posix_setrlimit'
|| $function === 'sapi_windows_generate_ctrl_event'
|| $function === 'imagegrabscreen'
) {
return true;
}
if ($function[0] instanceof SoapServer) {
/* TODO: Uses fatal errors */
return true;
}
return false;
}