1--TEST--
2The SensitiveParameter attribute suppresses the single sensitive argument for closures.
3--FILE--
4<?php
5
6$test = function (#[SensitiveParameter] $sensitive)
7{
8    debug_print_backtrace();
9    var_dump(debug_backtrace());
10    var_dump((new Exception)->getTrace());
11};
12
13$test('sensitive');
14
15?>
16--EXPECTF--
17#0 %ssensitive_parameter_closure.php(10): {closure}(Object(SensitiveParameterValue))
18array(1) {
19  [0]=>
20  array(4) {
21    ["file"]=>
22    string(%d) "%ssensitive_parameter_closure.php"
23    ["line"]=>
24    int(10)
25    ["function"]=>
26    string(9) "{closure}"
27    ["args"]=>
28    array(1) {
29      [0]=>
30      object(SensitiveParameterValue)#%d (0) {
31      }
32    }
33  }
34}
35array(1) {
36  [0]=>
37  array(4) {
38    ["file"]=>
39    string(%d) "%ssensitive_parameter_closure.php"
40    ["line"]=>
41    int(10)
42    ["function"]=>
43    string(9) "{closure}"
44    ["args"]=>
45    array(1) {
46      [0]=>
47      object(SensitiveParameterValue)#%d (0) {
48      }
49    }
50  }
51}
52