1--TEST--
2Hook parameters accept parameter-targeted attributes
3--FILE--
4<?php
5
6class C {
7    public $prop {
8        set(#[SensitiveParameter] $value) {
9            throw new Exception('Exception from $prop');
10        }
11    }
12}
13
14$c = new C();
15try {
16    $c->prop = 'secret';
17} catch (Exception $e) {
18    echo $e;
19}
20
21?>
22--EXPECTF--
23Exception: Exception from $prop in %s:%d
24Stack trace:
25#0 %s(%d): C->$prop::set(Object(SensitiveParameterValue))
26#1 {main}
27