svn: /phpdoc/en/trunk/appendices/migration70/ incompatible.xml
| From: | Adam Harvey | Date: | Sun, 09 Aug 2015 01:14:16 +0000 |
| Subject: | svn: /phpdoc/en/trunk/appendices/migration70/ incompatible.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-13517@lists.php.net to get a copy of this message | ||
aharvey Sun, 09 Aug 2015 01:14:16 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=337332
Log:
Reorder the backward compatibility page to put more common features first.
Changed paths:
U phpdoc/en/trunk/appendices/migration70/incompatible.xml
Modified: phpdoc/en/trunk/appendices/migration70/incompatible.xml
===================================================================
--- phpdoc/en/trunk/appendices/migration70/incompatible.xml 2015-08-09 00:14:01 UTC (rev 337331)
+++ phpdoc/en/trunk/appendices/migration70/incompatible.xml 2015-08-09 01:14:16 UTC (rev 337332)
@@ -8,6 +8,33 @@
note of some backward incompatible changes:
</simpara>
+ <sect2 xml:id="migration70.incompatible.var">
+ <title>Changes to the Evaluation Order for Variable Operators</title>
+
+ <para>
+ The evaluation order for variable operators has been changed to enable them
+ to be arbitrarily combined. The new behaviour is that all operators will be
+ evailuated from left-to-right:
+ </para>
+
+ <informalexample>
+ <programlisting>
+ // old meaning // new meaning
+$$foo['bar']['baz'] ${$foo['bar']['baz']}
($$foo)['bar']['baz']
+$foo->$bar['baz'] $foo->{$bar['baz']}
($foo->$bar)['baz']
+$foo->$bar['baz']() $foo->{$bar['baz']}()
($foo->$bar)['baz']()
+Foo::$bar['baz']() Foo::{$bar['baz']}()
(Foo::$bar)['baz']()
+ </programlisting>
+ </informalexample>
+
+ <para>
+ Code that used the old right-to-left evaluation order must be rewritten to
+ explicitly use that evaluation order with curly braces (see the above middle
+ column). This will make the code both forwards compatible with PHP 7.x and
+ backwards compatible with PHP 5.x.
+ </para>
+ </sect2>
+
<sect2 xml:id="migration70.incompatible.php-tags">
<title>ASP and script PHP tags removal</title>
@@ -47,6 +74,25 @@
</para>
</sect2>
+ <sect2 xml:id="migration70.incompatible.ini-comments">
+ <title>Drop #-style comments in INI files</title>
+
+ <para>
+ Support for <literal>#</literal>-style comments in INI files has been dropped.
<literal>;</literal>
+ is the only possible comment indicator now.
+ </para>
+ </sect2>
+
+ <sect2 xml:id="migration70.incompatible.invalid-octals">
+ <title>Invalid Octal Literals</title>
+
+ <para>
+ Previously, octal literals that contained invalid numbers were silently
+ truncated (<literal>0128</literal> was taken as <literal>012</literal>).
+ Now, an invalid octal literal will cause a parse error.
+ </para>
+ </sect2>
+
<sect2 xml:id="migration70.incompatible.removed-functions">
<title>Removed functions</title>
@@ -132,52 +178,6 @@
</listitem>
</itemizedlist>
</sect2>
-
- <sect2 xml:id="migration70.incompatible.ini-comments">
- <title>Drop #-style comments in INI files</title>
-
- <para>
- Support for <literal>#</literal>-style comments in INI files has been dropped.
<literal>;</literal>
- is the only possible comment indicator now.
- </para>
- </sect2>
-
- <sect2 xml:id="migration70.incompatible.invalid-octals">
- <title>Invalid Octal Literals</title>
-
- <para>
- Previously, octal literals that contained invalid numbers were silently
- truncated (<literal>0128</literal> was taken as <literal>012</literal>).
- Now, an invalid octal literal will cause a parse error.
- </para>
- </sect2>
-
- <sect2 xml:id="migration70.incompatible.var">
- <title>Changes to the Evaluation Order for Variable Operators</title>
-
- <para>
- The evaluation order for variable operators has been changed to enable them
- to be arbitrarily combined. The new behaviour is that all operators will be
- evailuated from left-to-right:
- </para>
-
- <informalexample>
- <programlisting>
- // old meaning // new meaning
-$$foo['bar']['baz'] ${$foo['bar']['baz']}
($$foo)['bar']['baz']
-$foo->$bar['baz'] $foo->{$bar['baz']}
($foo->$bar)['baz']
-$foo->$bar['baz']() $foo->{$bar['baz']}()
($foo->$bar)['baz']()
-Foo::$bar['baz']() Foo::{$bar['baz']}()
(Foo::$bar)['baz']()
- </programlisting>
- </informalexample>
-
- <para>
- Code that used the old right-to-left evaluation order must be rewritten to
- explicitly use that evaluation order with curly braces (see the above middle
- column). This will make the code both forwards compatible with PHP 7.x and
- backwards compatible with PHP 5.x.
- </para>
- </sect2>
</sect1>
<!-- Keep this comment at the end of the file