mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00

see https://wiki.php.net/rfc/deprecated_attribute Co-authored-by: Tim Düsterhus <tim@tideways-gmbh.com> Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com>
22 lines
388 B
PHP
22 lines
388 B
PHP
--TEST--
|
|
#[\Deprecated]: Message from protected class constant.
|
|
--FILE--
|
|
<?php
|
|
|
|
class P {
|
|
protected const DEPRECATION_MESSAGE = 'from class constant';
|
|
}
|
|
|
|
class Clazz extends P {
|
|
#[\Deprecated(parent::DEPRECATION_MESSAGE)]
|
|
public function test() {
|
|
|
|
}
|
|
}
|
|
|
|
$c = new Clazz();
|
|
$c->test();
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Deprecated: Method Clazz::test() is deprecated, from class constant in %s on line %d
|