mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 08:28:54 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@348151 c90b9560-bf6c-de11-be94-00142212c4b1
212 lines
6.2 KiB
XML
212 lines
6.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
|
|
<sect1 xml:id="migration71.other-changes" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<title>Other changes</title>
|
|
|
|
<sect2 xml:id="migration71.other-changes.apprise-on-arithmetic-with-invalid-strings">
|
|
<title>Notices and warnings on arithmetic with invalid strings</title>
|
|
|
|
<para>
|
|
New <constant>E_WARNING</constant> and <constant>E_NOTICE</constant> errors
|
|
have been introduced when invalid strings are coerced using operators
|
|
expecting numbers (<literal>+</literal> <literal>-</literal>
|
|
<literal>*</literal> <literal>/</literal> <literal>**</literal>
|
|
<literal>%</literal> <literal><<</literal> <literal>>></literal>
|
|
<literal>|</literal> <literal>&</literal> <literal>^</literal>) or their
|
|
assignment equivalents. An <constant>E_NOTICE</constant> is emitted when the
|
|
string begins with a numeric value but contains trailing non-numeric
|
|
characters, and an <constant>E_WARNING</constant> is emitted when the string
|
|
does not contain a numeric value.
|
|
</para>
|
|
|
|
<informalexample>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
'1b' + 'something';
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
Notice: A non well formed numeric value encountered in %s on line %d
|
|
Warning: A non-numeric value encountered in %s on line %d
|
|
]]>
|
|
</screen>
|
|
</informalexample>
|
|
</sect2>
|
|
|
|
<sect2 xml:id="migration71.other-changes.warn-on-octal-overflow">
|
|
<title>Warn on octal escape sequence overflow</title>
|
|
|
|
<para>
|
|
Previously, 3-octet octal string escape sequences would overflow silently.
|
|
Now, they will still overflow, but <constant>E_WARNING</constant> will be
|
|
emitted.
|
|
</para>
|
|
|
|
<informalexample>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
var_dump("\500");
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
Warning: Octal escape sequence overflow \500 is greater than \377 in %s on line %d
|
|
string(1) "@"
|
|
]]>
|
|
</screen>
|
|
</informalexample>
|
|
</sect2>
|
|
|
|
<sect2 xml:id="migration71.other-changes.inconsistency-fixes-to-this">
|
|
<title>Inconsistency fixes to <literal>$this</literal></title>
|
|
|
|
<para>
|
|
Whilst <literal>$this</literal> is considered a special variable in PHP, it
|
|
lacked proper checks to ensure it wasn't used as a variable name or
|
|
reassigned. This has now been rectified to ensure that
|
|
<literal>$this</literal> cannot be a user-defined variable, reassigned to a
|
|
different value, or be globalised.
|
|
</para>
|
|
</sect2>
|
|
|
|
<sect2 xml:id="migration71.other-changes.session-id-generation-without-hashing">
|
|
<title>Session ID generation without hashing</title>
|
|
|
|
<para>
|
|
Session IDs will no longer be hashed upon generation. With this change
|
|
brings about the removal of the following four ini settings:
|
|
</para>
|
|
|
|
<itemizedlist>
|
|
<listitem>
|
|
<simpara>
|
|
<parameter>session.entropy_file</parameter>
|
|
</simpara>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara>
|
|
<parameter>session.entropy_length</parameter>
|
|
</simpara>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara>
|
|
<parameter>session.hash_function</parameter>
|
|
</simpara>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara>
|
|
<parameter>session.hash_bits_per_character</parameter>
|
|
</simpara>
|
|
</listitem>
|
|
</itemizedlist>
|
|
|
|
<para>
|
|
And the addition of the following two ini settings:
|
|
</para>
|
|
|
|
<itemizedlist>
|
|
<listitem>
|
|
<simpara>
|
|
<parameter>session.sid_length</parameter> - defines the length of the
|
|
session ID, defaulting to 32 characters for backwards compatibility)
|
|
</simpara>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara>
|
|
<parameter>session.sid_bits_per_character</parameter> - defines the number
|
|
of bits to be stored per character (i.e. increases the range of characters
|
|
that can be used in the session ID), defaulting to 4 for backwards
|
|
compatibility
|
|
</simpara>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</sect2>
|
|
|
|
<sect2 xml:id="migration71.other-changes.ini-file-handling">
|
|
<title>Changes to INI file handling</title>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>precision</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
If the value is set to -1, then the dtoa mode 0 is used. The default
|
|
value is still 14.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>serialize_precision</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
If the value is set to -1, then the dtoa mode 0 is used. The value -1 is
|
|
now used by default.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>gd.jpeg_ignore_warning</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
The default of this &php.ini; setting has been changed to 1, so by
|
|
default libjpeg warnings are ignored.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>opcache.enable_cli</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
The default of this &php.ini; setting has been changed to 1
|
|
(enabled) in PHP 7.1.2, and back to 0 (disabled) in PHP 7.1.7.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</sect2>
|
|
|
|
<sect2 xml:id="migration71.other-changes.session-id-csprng-gen">
|
|
<title>Session ID generation with a CSPRNG only</title>
|
|
|
|
<para>
|
|
Session IDs will now only be generated with a CSPRNG.
|
|
</para>
|
|
</sect2>
|
|
|
|
<sect2 xml:id="migration71.other-changes.typeerror-error-messages">
|
|
<title>More informative <classname>TypeError</classname> messages when &null; is allowed</title>
|
|
<para>
|
|
<classname>TypeError</classname> exceptions for arg_info type checks will
|
|
now provide more informative error messages. If the parameter type or return
|
|
type accepts &null; (by either having a default value of &null; or being a
|
|
nullable type), then the error message will now mention this with a message
|
|
of "must be ... or null" or "must ... or be null."
|
|
</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
|
|
-->
|