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 466d349 commit c231bdfCopy full SHA for c231bdf
Zend/tests/traits/constant_016.phpt
@@ -1,13 +1,14 @@
1
--TEST--
2
Compatibility of values of same name trait constants is checked after their constant expressions are evaluated
3
+--ENV--
4
+ENSURE_CONSTANT_IS_DEFINED_AT_RUNTIME=1
5
--FILE--
6
<?php
7
8
// Ensure CONSTANT is defined at runtime
-function define_constant(): void {
- eval("define('CONSTANT', 2);");
9
+if ($_ENV['ENSURE_CONSTANT_IS_DEFINED_AT_RUNTIME']) {
10
+ define('CONSTANT', 2);
11
}
-define_constant();
12
13
trait TestTrait {
14
public const Constant = 40 + CONSTANT;
0 commit comments