mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Minor improvements to migration guide.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@323668 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
6c07266b1e
commit
0b24b3ede7
1 changed files with 26 additions and 18 deletions
|
@ -72,20 +72,21 @@
|
|||
<simpara>
|
||||
The <link linkend="control-structures.break"><literal>break</literal></link>
|
||||
and <link linkend="control-structures.continue"><literal>continue</literal></link>
|
||||
keywords don't accept variable argument anymore. Consider using
|
||||
a static constant argument.
|
||||
statements don't accept variable arguments anymore, i.e. writing
|
||||
<literal>break 1 + foo() * $bar;</literal> is not possible. You can obviously still use
|
||||
static arguments, like <literal>break 2;</literal>.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<link linkend="features.safe-mode"><literal>Safe mode</literal></link> is no
|
||||
longer supported. Any application that rely on safe mode may need
|
||||
adjustements in term of security.
|
||||
longer supported. Any applications that rely on safe mode may need
|
||||
adjustements in terms of security.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Salsa10 and Salsa20 hash algorithms have been removed.
|
||||
The Salsa10 and Salsa20 <link linkend="book.hash">hash algorithms</link> have been removed.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
|
@ -96,53 +97,60 @@
|
|||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<link linkend="security.magicquotes">Magic quotes</link> has been removed. Applications relying
|
||||
on this feature need to be updated to avoid security issues.
|
||||
</simpara>
|
||||
<simpara>
|
||||
<function>get_magic_quotes_gpc</function> and <function>get_magic_quotes_runtime</function>
|
||||
now always return false. <function>set_magic_quotes_runtime</function> raises an
|
||||
<constant>E_CORE_ERROR</constant>
|
||||
<constant>E_CORE_ERROR</constant>.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Non-numeric string offsets - e.g. $a['foo'] where $a is a string - now return
|
||||
false on <function>isset</function> and true on <function>empty</function>, and produce warning
|
||||
if trying to use them. Offsets of types double, bool and null produce notice. Numeric strings ($a['2'])
|
||||
still work as before. Note that offsets like '12.3' and '5 and a half' are considered non-numeric
|
||||
and produce warning, but are converted to 12 and 5 respectively for BC reasons.
|
||||
Non-numeric string offsets - e.g. <literal>$a['foo']</literal> where $a is a string - now return
|
||||
false on <function>isset</function> and true on <function>empty</function>, and produce a warning
|
||||
if you try to use them. Offsets of types double, bool and null produce a notice. Numeric strings
|
||||
(e.g. <literal>$a['2']</literal>) still work as before. Note that offsets like <literal>'12.3'</literal>
|
||||
and <literal>'5 foobar'</literal> are considered non-numeric and produce a warning, but are converted
|
||||
to 12 and 5 respectively for BC reasons.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Turning null, false or empty string into an object by adding a property
|
||||
Turning &null;, &false; or an empty string into an object by adding a property
|
||||
will now emit a warning instead of an <constant>E_STRICT</constant> error.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Converting array to string now will cause <constant>E_NOTICE</constant> warning.
|
||||
Converting an array to string will now cause an <constant>E_NOTICE</constant>. The result of
|
||||
the cast will still be <literal>"Array"</literal>.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Shadowing names of superglobals for parameter names now causes a fatal error.
|
||||
Parameter names that shadow superglobals now cause a fatal error. This prohibits code like
|
||||
<literal>function foo($_GET, $_POST) {}</literal>.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<function>array_combine</function> now returns <literal>array()</literal> instead of <literal>FALSE</literal>
|
||||
<function>array_combine</function> now returns <literal>array()</literal> instead of &false;
|
||||
when two empty arrays are provided as parameters.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<function>call_user_func_array</function> no longer allows call-time pass by reference.
|
||||
<link linkend="language.references.pass">Call-time pass by reference</link> has been removed.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<function>htmlentities</function> now emits an <constant>E_STRICT</constant> warning when used with
|
||||
asian characters, as in that case <function>htmlentities</function> has (and already had before this version)
|
||||
the same functionality as <function>htmlspecialchars</function>.
|
||||
asian character sets, as in that case <function>htmlentities</function> has (and already had before
|
||||
this version) the same functionality as <function>htmlspecialchars</function>.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
|
Loading…
Reference in a new issue