svn: /phpdoc/en/trunk/ appendices/migration70/incompatible/variable-handling.xml reference/array/functions/list.xml

From: Date: Sun, 09 Aug 2015 01:14:43 +0000
Subject: svn: /phpdoc/en/trunk/ appendices/migration70/incompatible/variable-handling.xml reference/array/functions/list.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-13522@lists.php.net to get a copy of this message
aharvey Sun, 09 Aug 2015 01:14:43 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=337337 Log: Expand the PHP 7 changelog for list(). Changed paths: U phpdoc/en/trunk/appendices/migration70/incompatible/variable-handling.xml U phpdoc/en/trunk/reference/array/functions/list.xml Modified: phpdoc/en/trunk/appendices/migration70/incompatible/variable-handling.xml =================================================================== --- phpdoc/en/trunk/appendices/migration70/incompatible/variable-handling.xml 2015-08-09 01:14:37 UTC (rev 337336) +++ phpdoc/en/trunk/appendices/migration70/incompatible/variable-handling.xml 2015-08-09 01:14:43 UTC (rev 337337) @@ -157,8 +157,8 @@ <title>Empty <function>list</function> assignments have been removed</title> <para> - <function>list</function> constructs can no longer be empty, or contain - empty variables. The following are no longer allowed: + <function>list</function> constructs can no longer be empty. The following + are no longer allowed: </para> <informalexample> Modified: phpdoc/en/trunk/reference/array/functions/list.xml =================================================================== --- phpdoc/en/trunk/reference/array/functions/list.xml 2015-08-09 01:14:37 UTC (rev 337336) +++ phpdoc/en/trunk/reference/array/functions/list.xml 2015-08-09 01:14:43 UTC (rev 337337) @@ -54,9 +54,29 @@ <row> <entry>7.0.0</entry> <entry> - Will not work with string. + <link linkend="migration70.incompatible.variable-handling.list.order"> + The order that the assignment operations are performed in has + changed. + </link> </entry> </row> + <row> + <entry>7.0.0</entry> + <entry> + <link linkend="migration70.incompatible.variable-handling.list.empty"> + <function>list</function> expressions can no longer be completely + empty. + </link> + </entry> + </row> + <row> + <entry>7.0.0</entry> + <entry> + <link linkend="migration70.incompatible.variable-handling.list.string"> + Strings can no longer be unpacked. + </link> + </entry> + </row> </tbody> </tgroup> </informaltable> @@ -182,13 +202,21 @@ &reftitle.notes; <warning> <para> - <function>list</function> assigns the values starting with the right-most - parameter. If you are using plain variables, you don't have to worry - about this. But if you are using arrays with indices you usually expect - the order of the indices in the array the same you wrote in the - <function>list</function> from left to right; which it isn't. It's - assigned in the reverse order. + In PHP 5, <function>list</function> assigns the values starting with the + right-most parameter. In PHP 7, <function>list</function> starts with the + left-most parameter. </para> + <para> + If you are using plain variables, you don't have to worry about this. But + if you are using arrays with indices you usually expect the order of the + indices in the array the same you wrote in the <function>list</function> + from left to right, which is not the case in PHP 5, as it's assigned in the + reverse order. + </para> + <para> + Generally speaking, it is advisable to avoid relying on a specific order + of operation, as this may change again in the future. + </para> </warning> <warning> <para>

« previous php.doc.cvs (#13522) next »