/
new-features.xml
202 lines (163 loc) · 5.56 KB
/
new-features.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<?xml version="1.0" encoding="utf-8"?>
<sect1 xml:id="migration83.new-features" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>New Features</title>
<sect2 xml:id="migration83.new-features.core">
<title>PHP Core</title>
<sect3 xml:id="migration83.new-features.core.readonly-modifier-improvements">
<title>Readonly Amendments</title>
<para>
Anonymous classes may now be marked as readonly.
</para>
<para>
Readonly properties can now be reinitialized during cloning.
<!-- RFC: https://wiki.php.net/rfc/readonly_amendments -->
</para>
</sect3>
<sect3 xml:id="migration83.new-features.core.typed-class-constants">
<title>Typed Class Constants</title>
<para>
Class, interface, trait, and enum constants now support type declarations.
<!-- RFC: https://wiki.php.net/rfc/typed_class_constants -->
</para>
</sect3>
<sect3 xml:id="migration83.new-features.core.closures-created-from-magic-methods">
<title>Closures created from magic methods</title>
<para>
Closures created from magic methods can now accept named arguments.
</para>
</sect3>
<sect3 xml:id="migration83.new-features.core.final-modifier-method-from-trait">
<title>The final modifier with a method from a trait</title>
<para>
The final modifier may now be used when using a method from a trait.
</para>
</sect3>
<sect3 xml:id="migration83.new-features.core.override-attribute">
<title>Override Attribute</title>
<para>
Added the #[\Override] attribute to check that a method exists in a parent
class or implemented interface.
<!-- RFC: https://wiki.php.net/rfc/marking_overriden_methods -->
</para>
</sect3>
<sect3 xml:id="migration83.new-features.core.fetch-class-constant-dynamically-syntax">
<title>Fetch class constant dynamically syntax</title>
<para>
Class constants can now be accessed dynamically using the
<code>C::{$name}</code> syntax.
<!-- RFC: https://wiki.php.net/rfc/dynamic_class_constant_fetch -->
</para>
</sect3>
<sect3 xml:id="migration83.new-features.core.static-variable-initializers">
<title>Static variable Initializers</title>
<para>
Static variable initializers can now contain arbitrary expressions.
<!-- RFC: RFC: https://wiki.php.net/rfc/arbitrary_static_variable_initializers -->
</para>
</sect3>
<sect3 xml:id="migration83.new-features.core.fallback-value-syntax-for-php-ini">
<title>Fallback value syntax for ini variables</title>
<para>
php.ini now supports fallback/default value syntax.
<!-- refs: https://github.com/php/php-src/pull/11351 -->
<informalexample>
<programlisting role="php">
<![CDATA[
<?php
/*
On /path/to/user.ini contains the following settings:
listen = localhost:${DRUPAL_FPM_PORT:-9000}
*/
$user_ini = parse_ini_file('/path/to/user.ini');
echo $user_ini['listen']; // localhost:9000
]]>
</programlisting>
</informalexample>
</para>
</sect3>
</sect2>
<sect2 xml:id="migration83.new-features.cli">
<title>CLI</title>
<para>
It is now possible to lint multiple files.
</para>
</sect2>
<sect2 xml:id="migration83.new-features.dom">
<title>DOM</title>
<para>
Added properties <property>DOMElement::$className</property>
and <property>DOMElement::$id</property>.
These are not binary-safe at the moment because of underlying limitations
of libxml2.
This means that the property values will be cut off at a NUL byte.
</para>
<para>
Added properties <property>DOMNode::$isConnected</property>
and <property>DOMNameSpaceNode::$isConnected</property>.
</para>
<para>
Added properties <property>DOMNode::$parentElement</property>
and <property>DOMNameSpaceNode::$parentElement</property>.
</para>
</sect2>
<sect2 xml:id="migration83.new-features.ffi">
<title>FFI</title>
<para>
It is now possible to assign <classname>FFI\CData</classname> to other FFI\CData.
Meaning CData can now be assigned to structs and fields.
</para>
</sect2>
<sect2 xml:id="migration83.new-features.opcache">
<title>Opcache</title>
<para>
<code>opcache_get_status()['scripts'][n]['revalidate']</code> now contains
a Unix timestamp of when the next revalidation of the scripts timestamp is
due, dictated by the
<link linkend="ini.opcache.revalidate-freq">opcache.revalidate_freq</link>
INI directive.
</para>
</sect2>
<sect2 xml:id="migration83.new-features.posix">
<title>POSIX</title>
<para>
<function>posix_getrlimit</function> now takes an optional
<parameter>$res</parameter> parameter to allow fetching a single resource limit.
</para>
<para>
<function>posix_isatty</function> now raises type warnings for integers
following the usual ZPP semantics.
</para>
<para>
<function>posix_ttyname</function> now raises type warnings for integers
following the usual ZPP semantics and value warnings for invalid file
descriptor integers.
</para>
</sect2>
<sect2 xml:id="migration83.new-features.streams">
<title>Streams</title>
<para>
Streams can now emit the <constant>STREAM_NOTIFY_COMPLETED</constant>
notification. This was previously not implemented.
</para>
</sect2>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->