svn: /phpdoc/en/trunk/language/ operators.xml
| From: | Bob Weinand | Date: | Thu, 22 Oct 2015 12:27:56 +0000 |
| Subject: | svn: /phpdoc/en/trunk/language/ operators.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-13806@lists.php.net to get a copy of this message | ||
bwoebi Thu, 22 Oct 2015 12:27:56 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=338020
Log:
Extend the existing array operator example to illustrate the behavior of +=.
--
Provided by anonymous 62668 ()
Changed paths:
U phpdoc/en/trunk/language/operators.xml
Modified: phpdoc/en/trunk/language/operators.xml
===================================================================
--- phpdoc/en/trunk/language/operators.xml 2015-10-22 12:00:00 UTC (rev 338019)
+++ phpdoc/en/trunk/language/operators.xml 2015-10-22 12:27:56 UTC (rev 338020)
@@ -2050,6 +2050,10 @@
$c = $b + $a; // Union of $b and $a
echo "Union of \$b and \$a: \n";
var_dump($c);
+
+$a += $b; // Union of $a += $b is $a and $b
+echo "Union of \$a += \$b: \n";
+var_dump($a);
?>
]]>
</programlisting>
@@ -2075,6 +2079,15 @@
["c"]=>
string(6) "cherry"
}
+Union of $a += $b:
+array(3) {
+ 'a' =>
+ string(5) "apple"
+ 'b' =>
+ string(6) "banana"
+ 'c' =>
+ string(6) "cherry"
+}
]]>
</screen>
</para>