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