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