appendices/migration81/new-features.xml
161dde4fe721309398dd324edbf02aec409f127b
...
...
@@ -31,8 +31,17 @@
31
31
<title>Array Unpacking with String Keys</title>
32
32

33
33
<para>
34
-
Added support for array unpacking with strings keys.
35
-
<!-- TODO Add an example -->
34
+
Added support for <link linkend="language.types.array.unpacking">array unpacking with strings keys</link>.
35
+
<informalexample>
36
+
<programlisting role="php">
37
+
<![CDATA[
38
+
<?php
39
+
$arr1 = [1, 'a' => 'b'];
40
+
$arr2 = [...$arr1, 'c' => 'd']; //[1, 'a' => 'b', 'c' => 'd']
41
+
?>
42
+
]]>
43
+
</programlisting>
44
+
</informalexample>
36
45
</para>
37
46
<!-- RFC: https://wiki.php.net/rfc/array_unpacking_string_keys -->
38
47
</sect3>
...
...
@@ -63,7 +72,7 @@
63
72
<title>Enumerations</title>
64
73

65
74
<para>
66
-
Support for <!--<link linkend="language.enumeration">-->Enumerations<!--</link>--> has been added.
75
+
Support for <link linkend="language.enumerations">Enumerations</link> has been added.
67
76
<!-- RFC: https://wiki.php.net/rfc/enumerations -->
68
77
</para>
69
78
</sect3>
...
...
@@ -72,7 +81,7 @@
72
81
<title>Fibers</title>
73
82

74
83
<para>
75
-
Support for <!--<link linkend="language.fibers">-->Fibers<!--</link>--> has been added.
84
+
Support for <link linkend="language.fibers">Fibers</link> has been added.
76
85
<!-- RFC: https://wiki.php.net/rfc/fibers -->
77
86
</para>
78
87
</sect3>
...
...
@@ -81,7 +90,7 @@
81
90
<title>First Class Callable Syntax</title>
82
91

83
92
<para>
84
-
Closures for callables can now be created using the syntax <code>myFunc(...)</code>,
93
+
Closures for callables can now be created using <link linkend="functions.first_class_callable_syntax">the syntax <code>myFunc(...)</code></link>,
85
94
which is identical to <code>Closure::fromCallable('myFunc')</code>.
86
95
<!-- RFC: https://wiki.php.net/rfc/first_class_callable_syntax -->
87
96
</para>
...
...
@@ -96,13 +105,15 @@
96
105
<title>Intersection Types</title>
97
106

98
107
<para>
99
-
Support for <!--<link linkend="language.types.declarations.intersection">-->intersection types<!--</link>--> has been added.
108
+
Support for <link linkend="language.types.type-system.composite.intersection">intersection types</link> has been added.
100
109
<!-- RFC: https://wiki.php.net/rfc/pure-intersection-types -->
101
110
</para>
102
111
<caution>
103
112
<simpara>
104
-
Intersection types cannot be used together with
105
-
<link linkend="language.types.declarations.union">union types</link>
113
+
<link linkend="language.types.type-system.composite.intersection">
114
+
Intersection types</link> cannot be used together with
115
+
<link linkend="language.types.declarations.composite.union">
116
+
union types</link>
106
117
</simpara>
107
118
</caution>
108
119
</sect3>
...
...
@@ -135,7 +146,7 @@
135
146
<title>Readonly properties</title>
136
147

137
148
<para>
138
-
Support for <code>readonly</code> properties has been added.
149
+
Support for <link linkend="language.oop5.properties.readonly-properties">readonly</link> has been added.
139
150
<!-- RFC: https://wiki.php.net/rfc/readonly_properties_v2 -->
140
151
</para>
141
152
</sect3>
...
...
@@ -144,7 +155,8 @@
144
155
<title>Final class constants</title>
145
156

146
157
<para>
147
-
Added support for the <modifier>final</modifier> modifier for class constants.
158
+
Added support for <link linkend="language.oop5.final.example.php81">the <modifier>final</modifier> modifier for class constants</link>.
159
+
Also, interface constants become overridable by default.
148
160
<!-- RFC: https://wiki.php.net/rfc/final_class_const -->
149
161
</para>
150
162
</sect3>
...
...
@@ -221,10 +233,10 @@ curl_setopt($curl, CURLOPT_POSTFIELDS, ['file' => $file]);
221
233
<title>GD</title>
222
234

223
235
<para>
224
-
Avix support is now available through
236
+
Avif support is now available through
225
237
<function>imagecreatefromavif</function> and
226
238
<function>imageavif</function>,
227
-
if libgd has been built with Avix support.
239
+
if libgd has been built with Avif support.
228
240
</para>
229
241
</sect2>
230
242

...
...
@@ -441,7 +453,7 @@ new PDO('sqlite:file:path/to/sqlite.db?mode=ro')
441
453

442
454
<para>
443
455
<function>fputcsv</function> now accepts a new
444
-
<parameter>eol</parameter> argument which allow to define a custom
456
+
<parameter>eol</parameter> argument which allows to define a custom
445
457
End of Line sequence, the default remains the same and is <literal>"\n"</literal>.
446
458
</para>
447
459
</sect2>
...
...
@@ -451,7 +463,7 @@ new PDO('sqlite:file:path/to/sqlite.db?mode=ro')
451
463

452
464
<para>
453
465
<methodname>SplFileObject::fputcsv</methodname> now accepts a new
454
-
<parameter>eol</parameter> argument which allow to define a custom
466
+
<parameter>eol</parameter> argument which allows to define a custom
455
467
End of Line sequence, the default remains the same and is <literal>"\n"</literal>.
456
468
</para>
457
469
</sect2>
458
470