Skip to content

Commit 06e4d8f

Browse files
exakatGirgias
andauthored
Mention constant expression limitation prior to PHP 8.2 (#4413)
Co-authored-by: Gina Peter Banyard <[email protected]>
1 parent 20a9aaa commit 06e4d8f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

language/enumerations.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,10 @@ enum Suit: string
192192
</para>
193193

194194
<para>
195-
Equivalent values must be literals or literal expressions. Constants and constant expressions
196-
are not supported. That is, <literal>1 + 1</literal> is allowed, but <literal>1 + SOME_CONST</literal>
195+
The equivalent values may be a constant scalar expression.
196+
Prior to PHP 8.2.0, the equivalent values had to be literals or literal expressions.
197+
This means that constants and constant expressions were not supported.
198+
That is, <code>1 + 1</code> was allowed, but not <code>1 + SOME_CONST</code>.
197199
is not.
198200
</para>
199201

0 commit comments

Comments
 (0)