1--TEST-- 2The SensitiveParameter attribute suppresses all variadic arguments. 3--FILE-- 4<?php 5 6function test( 7 #[SensitiveParameter] ...$args 8) 9{ 10 debug_print_backtrace(); 11 var_dump(debug_backtrace()); 12 var_dump((new Exception)->getTrace()); 13} 14 15test('foo', 'bar', 'baz'); 16 17?> 18--EXPECTF-- 19#0 %ssensitive_parameter_variadic_arguments.php(12): test(Object(SensitiveParameterValue), Object(SensitiveParameterValue), Object(SensitiveParameterValue)) 20array(1) { 21 [0]=> 22 array(4) { 23 ["file"]=> 24 string(%d) "%ssensitive_parameter_variadic_arguments.php" 25 ["line"]=> 26 int(12) 27 ["function"]=> 28 string(4) "test" 29 ["args"]=> 30 array(3) { 31 [0]=> 32 object(SensitiveParameterValue)#%d (0) { 33 } 34 [1]=> 35 object(SensitiveParameterValue)#%d (0) { 36 } 37 [2]=> 38 object(SensitiveParameterValue)#%d (0) { 39 } 40 } 41 } 42} 43array(1) { 44 [0]=> 45 array(4) { 46 ["file"]=> 47 string(%d) "%ssensitive_parameter_variadic_arguments.php" 48 ["line"]=> 49 int(12) 50 ["function"]=> 51 string(4) "test" 52 ["args"]=> 53 array(3) { 54 [0]=> 55 object(SensitiveParameterValue)#%d (0) { 56 } 57 [1]=> 58 object(SensitiveParameterValue)#%d (0) { 59 } 60 [2]=> 61 object(SensitiveParameterValue)#%d (0) { 62 } 63 } 64 } 65} 66