svn: /phpdoc/en/trunk/appendices/ migration54.xml
| From: | Nikita Popov | Date: | Wed, 29 Feb 2012 16:39:41 +0000 |
| Subject: | svn: /phpdoc/en/trunk/appendices/ migration54.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-9721@lists.php.net to get a copy of this message | ||
nikic Wed, 29 Feb 2012 16:39:41 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=323668
Log:
Minor improvements to migration guide.
Changed paths:
U phpdoc/en/trunk/appendices/migration54.xml
Modified: phpdoc/en/trunk/appendices/migration54.xml
===================================================================
--- phpdoc/en/trunk/appendices/migration54.xml 2012-02-29 15:54:09 UTC (rev 323667)
+++ phpdoc/en/trunk/appendices/migration54.xml 2012-02-29 16:39:41 UTC (rev 323668)
@@ -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>
@@ -97,52 +98,59 @@
</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>