svn: /phpdoc/en/trunk/language/ operators.xml

From: Date: Thu, 09 Jun 2011 10:40:09 +0000
Subject: svn: /phpdoc/en/trunk/language/ operators.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-8230@lists.php.net to get a copy of this message
mgf Thu, 09 Jun 2011 10:40:09 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=311969 Log: Improved description of array + operator -- made it more like the one in array_merge(). Changed paths: U phpdoc/en/trunk/language/operators.xml Modified: phpdoc/en/trunk/language/operators.xml =================================================================== --- phpdoc/en/trunk/language/operators.xml 2011-06-09 09:00:56 UTC (rev 311968) +++ phpdoc/en/trunk/language/operators.xml 2011-06-09 10:40:09 UTC (rev 311969) @@ -9,15 +9,11 @@ </simpara> <para> Operators can be grouped according to the number of values they take. Unary - operators take only one value, for example - <literal>!</literal> (the <link linkend="language.operators.logical">negation operator</link>) or - <literal>++</literal> (the <link linkend="language.operators.increment">increment operator</link>). - Binary operators take two values, such as the familiar - <link linkend="language.operators.arithmetic">arithmetical operators</link> - <literal>+</literal> (plus) and <literal>-</literal> (minus), and the majority of PHP - operators fall into this category. Finally there is a single - <link linkend="language.operators.comparison.ternary">ternary operator</link>, <literal>? :</literal>, - which takes three values; this is usually referred to simply + operators take only one value, for example ! (the negation operator) or ++ + (the increment operator). Binary operators take two values, such as the + familiar arithmetical + (plus) and - (minus), and the majority of PHP + operators fall into this category. Finally there is a single ternary + operator, ? :, which takes three values; this is usually referred to simply as "the ternary operator" (although it should more properly be called the conditional operator). </para> @@ -1807,9 +1803,10 @@ </tgroup> </table> <para> - The <literal>+</literal> operator - appends elements of remaining keys from the right handed array to the - left handed, whereas duplicated keys are NOT overwritten. + The <literal>+</literal> operator returns the right-hand array appended + to the left-hand array; for keys that exist in both arrays, the elements + from the left-hand array will be used, and the matching elements from the + right-hand array will be ignored. </para> <para> <informalexample>

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