Skip to content

Commit a049ea0

Browse files
committed
Fix #81423: UPGRADING doesn't mention that readonly becomes a reserved keyword
1 parent 49eff29 commit a049ea0

File tree

2 files changed

+25
-5
lines changed

2 files changed

+25
-5
lines changed

appendices/migration81/incompatible.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,13 @@ var_dump(B::counter()); // int(4), previously int(2)
6969
</para>
7070
</sect3>
7171

72+
<sect3 xml:id="migration81.incompatible.core.new-keywords">
73+
<title>New Keywords</title>
74+
<para>
75+
<literal>readonly</literal> is a keyword now. However, it still may be used
76+
as function name.
77+
</para>
78+
</sect3>
7279
</sect2>
7380

7481
<sect2 xml:id="migration81.incompatible.resource2object">

appendices/reserved.xml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,9 @@
215215
</entry>
216216
</row>
217217
<row>
218+
<entry>
219+
<link linkend="language.oop5.properties.readonly-properties">readonly</link> (as of PHP 8.1.0) *
220+
</entry>
218221
<entry>
219222
<function>require</function>
220223
</entry>
@@ -227,11 +230,11 @@
227230
<entry>
228231
<link linkend="language.variables.scope">static</link>
229232
</entry>
233+
</row>
234+
<row>
230235
<entry>
231236
<link linkend="control-structures.switch">switch</link>
232237
</entry>
233-
</row>
234-
<row>
235238
<entry>
236239
<link linkend="language.exceptions">throw</link>
237240
</entry>
@@ -244,11 +247,11 @@
244247
<entry>
245248
<function>unset</function>
246249
</entry>
250+
</row>
251+
<row>
247252
<entry>
248253
<link linkend="language.namespaces">use</link>
249254
</entry>
250-
</row>
251-
<row>
252255
<entry>
253256
<link linkend="language.oop5.properties">var</link>
254257
</entry>
@@ -261,14 +264,24 @@
261264
<entry>
262265
<link linkend="language.generators">yield</link>
263266
</entry>
267+
</row>
268+
<row>
264269
<entry>
265270
<link linkend="control-structures.yield.from">yield from</link>
266271
</entry>
272+
<entry></entry>
273+
<entry></entry>
274+
<entry></entry>
275+
<entry></entry>
267276
</row>
268277
</tbody>
269278
</tgroup>
270279
</table>
271-
280+
281+
<simpara>
282+
* <literal>readonly</literal> may be used as function name.
283+
</simpara>
284+
272285
<table>
273286
<title>Compile-time constants</title>
274287
<tgroup cols="5">

0 commit comments

Comments
 (0)