1--TEST--
2#[\Deprecated]: Message from protected class constant.
3--FILE--
4<?php
5
6class P {
7	protected const DEPRECATION_MESSAGE = 'from class constant';
8}
9
10class Clazz extends P {
11	#[\Deprecated(parent::DEPRECATION_MESSAGE)]
12	public function test() {
13
14	}
15}
16
17$c = new Clazz();
18$c->test();
19
20?>
21--EXPECTF--
22Deprecated: Method Clazz::test() is deprecated, from class constant in %s on line %d
23