We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea9c9dc commit b4e9d9aCopy full SHA for b4e9d9a
Zend/tests/attributes/deprecated/class_constants/007.phpt
@@ -0,0 +1,23 @@
1
+--TEST--
2
+#[\Deprecated]: Using the value of a deprecated class constant in a constant expression.
3
+--FILE--
4
+<?php
5
+
6
+class Clazz {
7
+ #[\Deprecated("prefix")]
8
+ public const PREFIX = "prefix";
9
10
+ #[\Deprecated("suffix")]
11
+ public const SUFFIX = "suffix";
12
13
+ public const CONSTANT = self::PREFIX . self::SUFFIX;
14
+}
15
16
+var_dump(Clazz::CONSTANT);
17
18
+?>
19
+--EXPECTF--
20
+Deprecated: Constant Clazz::PREFIX is deprecated, prefix in %s on line %d
21
22
+Deprecated: Constant Clazz::SUFFIX is deprecated, suffix in %s on line %d
23
+string(12) "prefixsuffix"
0 commit comments