Skip to content

Commit 19a3daf

Browse files
committed
Fix a testcase to ensure a constant is defined at runtime
1 parent 4665ed2 commit 19a3daf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Zend/tests/traits/constant_016.phpt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ Compatibility of values of same name trait constants is checked after their cons
33
--FILE--
44
<?php
55

6-
define('CONSTANT', 2);
6+
// Ensure CONSTANT is defined at runtime
7+
function define_constant(): void {
8+
eval("define('CONSTANT', 2);");
9+
}
10+
define_constant();
711

812
trait TestTrait {
913
public const Constant = 40 + CONSTANT;

0 commit comments

Comments
 (0)