arginfo_zpp_mismatch.inc 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. function skipFunction($function): bool {
  3. if (false
  4. /* expect input / hang */
  5. || $function === 'readline'
  6. || $function === 'readline_read_history'
  7. || $function === 'readline_write_history'
  8. /* intentionally violate invariants */
  9. || $function === 'zend_create_unterminated_string'
  10. || $function === 'zend_test_array_return'
  11. || $function === 'zend_leak_bytes'
  12. /* mess with output */
  13. || (is_string($function) && str_starts_with($function, 'ob_'))
  14. || $function === 'output_add_rewrite_var'
  15. || $function === 'error_log'
  16. /* may spend a lot of time waiting for connection timeouts */
  17. || (is_string($function) && str_contains($function, 'connect'))
  18. || (is_string($function) && str_starts_with($function, 'snmp'))
  19. || (is_array($function) && get_class($function[0]) === mysqli::class
  20. && in_array($function[1], ['__construct', 'connect', 'real_connect']))
  21. /* misc */
  22. || $function === 'mail'
  23. || $function === 'mb_send_mail'
  24. || $function === 'pcntl_fork'
  25. || $function === 'pcntl_rfork'
  26. || $function === 'posix_kill'
  27. || $function === 'posix_setrlimit'
  28. || $function === 'sapi_windows_generate_ctrl_event'
  29. || $function === 'imagegrabscreen'
  30. ) {
  31. return true;
  32. }
  33. if ($function[0] instanceof SoapServer) {
  34. /* TODO: Uses fatal errors */
  35. return true;
  36. }
  37. return false;
  38. }