Skip to content

Commit a6a4d6a

Browse files
authored
PHP 8.1 | Other reserved words: add never
Similar to PR 938 for the PHP 8.0 `mixed` reserved word, this commit adds the new reserved word `never` to the list of "Other reserved words" and adds a mention of this to the Backward Incompatible Changes page in the migration guide. Co-authored-by: jrfnl <[email protected]> Closes GH-1434.
1 parent 10717d8 commit a6a4d6a

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

appendices/migration81/incompatible.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ ArgumentCountError - makeyogurt(): Argument #1 ($container) not passed
132132
<literal>readonly</literal> is a keyword now. However, it still may be used
133133
as function name.
134134
</para>
135+
<para>
136+
<literal>never</literal> is now a reserved word, so it cannot be used to name a class,
137+
interface or trait, and is also prohibited from being used in namespaces.
138+
</para>
135139
</sect3>
136140
</sect2>
137141

appendices/reserved.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,9 @@
552552
<entry>
553553
mixed (as of PHP 8.0)
554554
</entry>
555+
<entry>
556+
never (as of PHP 8.1)
557+
</entry>
555558
</row>
556559
</tbody>
557560
</tgroup>

0 commit comments

Comments
 (0)