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 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366
|
<?xml version="1.0" encoding="utf-8"?>
<sect1 xml:id="migration82.other-changes" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Other Changes</title>
<sect2 xml:id="migration82.other-changes.core">
<title>Core changes</title>
<para>
The <type>iterable</type> type is now a built-in compile time alias for
<type class="union"><type>array</type><type>Traversable</type></type>.
Error messages relating to <literal>iterable</literal> will therefore
now use <literal>array|Traversable</literal>.
Type Reflection is preserved for single <literal>iterable</literal>
(and <literal>?iterable</literal>) to produce a
<classname>ReflectionNamedType</classname> with name <literal>iterable</literal>,
however usage of <literal>iterable</literal> in union types will be
converted to <literal>array|Traversable</literal>.
</para>
<para>
The date format of sent cookies is now <literal>'D, d M Y H:i:s \G\M\T'</literal>;
previously it was <literal>'D, d-M-Y H:i:s T'</literal>.
</para>
</sect2>
<sect2 xml:id="migration82.other-changes.sapi">
<title>Changes in SAPI Modules</title>
<sect3 xml:id="migration82.other-changes.sapi.cli">
<title>CLI</title>
<para>
The STDOUT, STDERR and STDIN streams are no longer closed on resource destruction
which is mostly when the CLI finishes. It is however still possible to
explicitly close those streams using <function>fclose</function> and similar.
</para>
</sect3>
</sect2>
<sect2 xml:id="migration82.other-changes.functions">
<title>Changed Functions</title>
<sect3 xml:id="migration82.other-changes.functions.core">
<title>Core</title>
<para>
The <function>strcmp</function>, <function>strcasecmp</function>,
<function>strncmp</function>, <function>strncasecmp</function>, and
<function>substr_compare</function> functions, using binary safe string
comparison is no longer guaranteed to return
<code>strlen($string1) - strlen($string2)</code> when string lengths are not
equal, but may now return <literal>-1</literal> or <literal>1</literal>
instead. Instead of depending on any concrete value, the return value should
be compared to <literal>0</literal>.
</para>
</sect3>
<sect3 xml:id="migration82.other-changes.functions.dba">
<title>DBA</title>
<para>
<function>dba_open</function> and <function>dba_popen</function>
now have the following enforced signature:
<methodsynopsis>
<type class="union"><type>resource</type><type>false</type></type><methodname>dba_open</methodname>
<methodparam><type>string</type><parameter>path</parameter></methodparam>
<methodparam><type>string</type><parameter>mode</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>handler</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>permission</parameter><initializer>0644</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>map_size</parameter><initializer>0</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>flags</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
</para>
<para>
<function>dba_fetch</function>'s optional skip argument is now at the end
in line with PHP userland semantics. Its signature is now:
<methodsynopsis>
<type class="union"><type>string</type><type>false</type></type><methodname>dba_fetch</methodname>
<methodparam><type class="union"><type>string</type><type>array</type></type><parameter>key</parameter></methodparam>
<methodparam><type>resource</type><parameter>handle</parameter></methodparam>
<methodparam><type>int</type><parameter>skip</parameter></methodparam>
</methodsynopsis>
The overloaded signature:
<methodsynopsis>
<type class="union"><type>string</type><type>false</type></type><methodname>dba_fetch</methodname>
<methodparam><type class="union"><type>string</type><type>array</type></type><parameter>key</parameter></methodparam>
<methodparam><type>int</type><parameter>skip</parameter></methodparam>
<methodparam><type>resource</type><parameter>handle</parameter></methodparam>
</methodsynopsis>
is still accepted, but it is recommended to use the new standard variant.
</para>
</sect3>
<sect3 xml:id="migration82.other-changes.functions.random">
<title>Random</title>
<para>
<function>random_bytes</function> and <function>random_int</function>
now throw a <classname>\Random\RandomException</classname> on <acronym>CSPRNG</acronym> failures.
Previously a plain <classname>\Exception</classname> was thrown instead.
</para>
</sect3>
<sect3 xml:id="migration82.other-changes.functions.spl">
<title>SPL</title>
<para>
The <parameter>iterator</parameter> parameter of
<function>iterator_to_array</function> and <function>iterator_count</function>
is widened to <type>iterable</type> from <classname>Iterator</classname>,
allowing arrays to be passed.
<!-- RFC: https://wiki.php.net/rfc/iterator_xyz_accept_array -->
</para>
</sect3>
</sect2>
<sect2 xml:id="migration82.other-changes.extensions">
<title>Other Changes to Extensions</title>
<sect3 xml:id="migration82.other-changes.extensions.date">
<title>Date</title>
<para>
The properties of <classname>DatePeriod</classname> are now properly declared.
</para>
</sect3>
<sect3 xml:id="migration82.other-changes.extensions.intl">
<title>Intl</title>
<para>
Instances of
<classname>IntlBreakIterator</classname>,
<classname>IntlRuleBasedBreakIterator</classname>,
<classname>IntlCodePointBreakIterator</classname>,
<classname>IntlPartsIterator</classname>,
<classname>IntlCalendar</classname>,
<classname>Collator</classname>,
<classname>IntlIterator</classname>,
<classname>UConverter</classname>,
<classname>IntlDateFormatter</classname>,
<classname>IntlDatePatternGenerator</classname>,
<classname>MessageFormatter</classname>,
<classname>ResourceBundle</classname>,
<classname>Spoofchecker</classname>,
<classname>IntlTimeZone</classname>,
and <classname>Transliterator</classname>
are no longer serializable. Previously, they could be serialized, but
unserialization yielded unusable objects or failed.
</para>
</sect3>
<sect3 xml:id="migration82.other-changes.extensions.mysqli">
<title>MySQLi</title>
<para>
The support for libmysql has been removed and it is no longer
possible to compile mysqli with libmysql.
From now on, the mysqli extension can be compiled only with mysqlnd.
All libmysql features unavailable in mysqlnd have been removed:
<simplelist>
<member>The reconnect property of <classname>mysqli_driver</classname></member>
<member>
The <link linkend="ini.mysqli.reconnect">mysqli.reconnect</link> INI directive
</member>
<member>The <constant>MYSQLI_IS_MARIADB</constant> constant has been deprecated</member>
</simplelist>
</para>
</sect3>
<sect3 xml:id="migration82.other-changes.extensions.oci8">
<title>OCI8</title>
<para>
The minimum Oracle Client library version required is now 11.2.
</para>
</sect3>
<sect3 xml:id="migration82.other-changes.extensions.pcre">
<title>PCRE</title>
<para>
NUL characters (<literal>\0</literal>) in pattern strings are now supported.
</para>
</sect3>
<sect3 xml:id="migration82.other-changes.extensions.session">
<title>Session</title>
<para>
Trying to change the
<link linkend="ini.session.cookie-samesite">session.cookie_samesite</link>
INI directive while the session is active or output has already been sent
will now fail and emit a warning.
This aligns the behaviour with all other session INI settings.
</para>
</sect3>
<sect3 xml:id="migration82.other-changes.extensions.sqlite3">
<title>SQLite3</title>
<para>
<link linkend="ini.sqlite3.defensive">sqlite3.defensive</link>
is now <constant>INI_USER</constant>.
</para>
</sect3>
<sect3 xml:id="migration82.other-changes.extensions.standard">
<title>Standard</title>
<para>
<function>getimagesize</function> now reports the actual image dimensions,
bits and channels of AVIF images. Previously, the dimensions have been reported as 0x0,
and bits and channels have not been reported at all.
</para>
</sect3>
<sect3 xml:id="migration82.other-changes.extensions.tidy">
<title>Tidy</title>
<para>
The properties of the <classname>tidy</classname> class are now properly declared.
And those of the <classname>tidyNode</classname> class are now properly declared as readonly.
</para>
</sect3>
<sect3 xml:id="migration82.other-changes.extensions.zip">
<title>Zip</title>
<para>
The Zip extension has been updated to version 1.20.0,
which adds the following methods:
<simplelist>
<member><methodname>ZipArchive::clearError</methodname></member>
<member><methodname>ZipArchive::getStreamName</methodname></member>
<member><methodname>ZipArchive::getStreamIndex</methodname></member>
</simplelist>
</para>
</sect3>
</sect2>
<sect2 xml:id="migration82.other-changes.ini">
<title>Changes to INI File Handling</title>
<!-- Commit: https://github.com/php/php-src/commit/0f8b9eb49bd644f07175e9191d2cc146737446ad -->
<para>
Support for binary (<literal>0b</literal>/<literal>0B</literal>) and octal
(<literal>0o</literal>/<literal>0O</literal>) prefixes has been added to integer INI settings.
Integer INI settings that start with a zero (<literal>0</literal>)
continue to be interpreted as an octal integer.
</para>
<para>
Parsing of some ill-formatted values will now trigger a warning when this
was silently ignored before.
For backwards compatibility, interpretation of these values has not changed.
This affects the following settings:
<!-- TODO: Add missing INI links after directives have been documented -->
<simplelist>
<member><link linkend="ini.bcmath.scale">bcmath.scale</link></member>
<member><link linkend="ini.com.code-page">com.code_page</link></member>
<member><link linkend="ini.default-socket-timeout">default_socket_timeout</link></member>
<member>fiber.stack_size</member>
<member><link linkend="ini.hard-timeout">hard_timeout</link></member>
<member><link linkend="ini.intl.error-level">intl.error_level</link></member>
<member><link linkend="ini.ldap.max_links">ldap.max_links</link></member>
<member><link linkend="ini.max-input-nesting-level">max_input_nesting_level</link></member>
<member><link linkend="ini.max-input-vars">max_input_vars</link></member>
<member><link linkend="ini.mbstring.regex-retry-limit">mbstring.regex_retry_limit</link></member>
<member><link linkend="ini.mbstring.regex-stack-limit">mbstring.regex_stack_limit</link></member>
<member><link linkend="ini.mysqli.allow-local-infile">mysqli.allow_local_infile</link></member>
<member><link linkend="ini.mysqli.allow-persistent">mysqli.allow_persistent</link></member>
<member><link linkend="ini.mysqli.default-port">mysqli.default_port</link></member>
<member><link linkend="ini.mysqli.max-links">mysqli.max_links</link></member>
<member><link linkend="ini.mysqli.max-persistent">mysqli.max_persistent</link></member>
<member><link linkend="ini.mysqli.rollback-on-cached-plink">mysqli.rollback_on_cached_plink</link></member>
<member><link linkend="ini.mysqlnd.log-mask">mysqlnd.log_mask</link></member>
<member><link linkend="ini.mysqlnd.mempool-default-size">mysqlnd.mempool_default_size</link></member>
<member><link linkend="ini.mysqlnd.net-read-buffer-size">mysqlnd.net_read_buffer_size</link></member>
<member><link linkend="ini.mysqlnd.net-read-timeout">mysqlnd.net_read_timeout</link></member>
<member><link linkend="ini.oci8.default-prefetch">oci8.default_prefetch</link></member>
<member><link linkend="ini.oci8.max-persistent">oci8.max_persistent</link></member>
<member><link linkend="ini.oci8.persistent-timeout">oci8.persistent_timeout</link></member>
<member><link linkend="ini.oci8.ping-interval">oci8.ping_interval</link></member>
<member><link linkend="ini.oci8.prefetch-lob-size">oci8.prefetch_lob_size</link></member>
<member><link linkend="ini.oci8.privileged-connect">oci8.privileged_connect</link></member>
<member><link linkend="ini.oci8.statement-cache-size">oci8.statement_cache_size</link></member>
<member><link linkend="ini.uodbc.allow-persistent">odbc.allow_persistent</link></member>
<member><link linkend="ini.uodbc.check-persistent">odbc.check_persistent</link></member>
<member><link linkend="ini.uodbc.max-persistent">odbc.max_persistent</link></member>
<member><link linkend="ini.uodbc.max-links">odbc.max_links</link></member>
<member><link linkend="ini.uodbc.defaultbinmode">odbc.defaultbinmode</link></member>
<member><link linkend="ini.uodbc.defaultcursortype">odbc.default_cursortype</link></member>
<member><link linkend="ini.uodbc.defaultlrl">odbc.defaultlrl</link></member>
<member><link linkend="ini.opcache.consistency-checks">opcache.consistency_checks</link></member>
<member><link linkend="ini.opcache.file_update_protection">opcache.file_update_protection</link></member>
<member><link linkend="ini.opcache.force-restart-timeout">opcache.force_restart_timeout</link></member>
<member><link linkend="ini.opcache.interned-strings-buffer">opcache.interned_strings_buffer</link></member>
<member><link linkend="ini.opcache.jit-bisect-limit">opcache.jit_bisect_limit</link></member>
<member><link linkend="ini.opcache.jit-blacklist-root-trace">opcache.jit_blacklist_root_trace</link></member>
<member><link linkend="ini.opcache.jit-blacklist-side-trace">opcache.jit_blacklist_side_trace</link></member>
<member><link linkend="ini.opcache.jit-debug">opcache.jit_debug</link></member>
<member><link linkend="ini.opcache.jit-hot-func">opcache.jit_hot_func</link></member>
<member><link linkend="ini.opcache.jit-hot-loop">opcache.jit_hot_loop</link></member>
<member><link linkend="ini.opcache.jit-hot-return">opcache.jit_hot_return</link></member>
<member><link linkend="ini.opcache.jit-hot-side-exit">opcache.jit_hot_side_exit</link></member>
<member><link linkend="ini.opcache.jit-max-exit-counters">opcache.jit_max_exit_counters</link></member>
<member><link linkend="ini.opcache.jit-max-loop-unrolls">opcache.jit_max_loop_unrolls</link></member>
<member><link linkend="ini.opcache.jit-max-polymorphic-calls">opcache.jit_max_polymorphic_calls</link></member>
<member><link linkend="ini.opcache.jit-max-recursive-calls">opcache.jit_max_recursive_calls</link></member>
<member><link linkend="ini.opcache.jit-max-recursive-return">opcache.jit_max_recursive_returns</link></member>
<member><link linkend="ini.opcache.jit-max-root-traces">opcache.jit_max_root_traces</link></member>
<member><link linkend="ini.opcache.jit-max-side-traces">opcache.jit_max_side_traces</link></member>
<member><link linkend="ini.opcache.log-verbosity-level">opcache.log_verbosity_level</link></member>
<member><link linkend="ini.opcache.max-file-size">opcache.max_file_size</link></member>
<member><link linkend="ini.opcache.opt_debug_level">opcache.opt_debug_level</link></member>
<member><link linkend="ini.opcache.optimization-level">opcache.optimization_level</link></member>
<member><link linkend="ini.opcache.revalidate-freq">opcache.revalidate_freq</link></member>
<member><link linkend="ini.output-buffering">output_buffering</link></member>
<member><link linkend="ini.pcre.backtrack-limit">pcre.backtrack_limit</link></member>
<member><link linkend="ini.pcre.recursion-limit">pcre.recursion_limit</link></member>
<member><link linkend="ini.pgsql.max-links">pgsql.max_links</link></member>
<member><link linkend="ini.pgsql.max-persistent">pgsql.max_persistent</link></member>
<member><link linkend="ini.post-max-size">post_max_size</link></member>
<member><link linkend="ini.realpath-cache-size">realpath_cache_size</link></member>
<member><link linkend="ini.realpath-cache-ttl">realpath_cache_ttl</link></member>
<member><link linkend="ini.session.cache-expire">session.cache_expire</link></member>
<member><link linkend="ini.session.cookie-lifetime">session.cookie_lifetime</link></member>
<member><link linkend="ini.session.gc-divisor">session.gc_divisor</link></member>
<member><link linkend="ini.session.gc-maxlifetime">session.gc_maxlifetime</link></member>
<member><link linkend="ini.session.gc-probability">session.gc_probability</link></member>
<member><link linkend="ini.soap.wsdl-cache-limit">soap.wsdl_cache_limit</link></member>
<member><link linkend="ini.soap.wsdl-cache-ttl">soap.wsdl_cache_ttl</link></member>
<member><link linkend="ini.unserialize-max-depth">unserialize_max_depth</link></member>
<member><link linkend="ini.upload-max-filesize">upload_max_filesize</link></member>
<member><link linkend="ini.user-ini.cache-ttl">user_ini.cache_ttl</link></member>
<member><link linkend="ini.xmlrpc-error-number">xmlrpc_error_number</link></member>
<member><link linkend="ini.zend.assertions">zend.assertions</link></member>
<member><link linkend="ini.zlib.output-compression-level">zlib.output_compression_level</link></member>
</simplelist>
</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
-->
|