jan             Mon Jul  1 17:57:45 2002 EDT

  Modified files:              
    /phpdoc/en/language operators.xml 
    /phpdoc/en/reference/array/functions        array-merge.xml 
  Log:
   - fix #14992
  
  
Index: phpdoc/en/language/operators.xml
diff -u phpdoc/en/language/operators.xml:1.37 phpdoc/en/language/operators.xml:1.38
--- phpdoc/en/language/operators.xml:1.37       Wed May 29 05:54:38 2002
+++ phpdoc/en/language/operators.xml    Mon Jul  1 17:57:45 2002
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.37 $ -->
+<!-- $Revision: 1.38 $ -->
  <chapter id="language.operators">
   <title>Operators</title>
   <simpara>
@@ -643,7 +643,42 @@
     </informalexample>
    </para>
   </sect1>
+  
+  <sect1 id="language.operators.array">
+   <title>Array Operators</title>
+   <simpara>
+    The only array operator in PHP is the <literal>+</literal> operator.
+    It appends the right handed array to the left handed, whereas 
+    duplicated keys are NOT overwritten.
+   </simpara>
+   <para>
+    <informalexample>
+     <programlisting role="php">
+<![CDATA[
+$a = array("a" => "apple", "b" => "banana");
+$b = array("a" =>"pear", "b" => "strawberry", "c" => "cherry");
+
+$c = $a + $b;
 
+var_dump($c);
+]]>
+     </programlisting>
+     <screen role="php">
+<![CDATA[
+array(3) {
+  ["a"]=>
+  string(5) "apple"
+  ["b"]=>
+  string(6) "banana"
+  ["c"]=>
+  string(6) "cherry"
+}
+
+]]>
+       </screen>
+    </informalexample>
+   </para>
+  </sect1>
  </chapter>
  
 <!-- Keep this comment at the end of the file
Index: phpdoc/en/reference/array/functions/array-merge.xml
diff -u phpdoc/en/reference/array/functions/array-merge.xml:1.5 
phpdoc/en/reference/array/functions/array-merge.xml:1.6
--- phpdoc/en/reference/array/functions/array-merge.xml:1.5     Sat May 18 05:55:41 
2002
+++ phpdoc/en/reference/array/functions/array-merge.xml Mon Jul  1 17:57:45 2002
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
 <!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
   <refentry id="function.array-merge">
    <refnamediv>
@@ -98,6 +98,11 @@
       </para>
      </example>
     </para>
+    <note>
+     <para>
+      Shared keys will be overwritten on a first-come first-served basis.
+     </para>
+    </note>
     <para>
      See also <function>array_merge_recursive</function>.
     </para>



-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to