derick          Mon Jan 12 15:48:44 2004 EDT

  Modified files:              
    /phpdoc/en/reference/array/functions        array-push.xml 
  Log:
  - Add tip about $array[] to array_push()
  
  
Index: phpdoc/en/reference/array/functions/array-push.xml
diff -u phpdoc/en/reference/array/functions/array-push.xml:1.8 
phpdoc/en/reference/array/functions/array-push.xml:1.9
--- phpdoc/en/reference/array/functions/array-push.xml:1.8      Sun Aug 17 08:21:03 
2003
+++ phpdoc/en/reference/array/functions/array-push.xml  Mon Jan 12 15:48:44 2004
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.8 $ -->
+<!-- $Revision: 1.9 $ -->
 <!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
   <refentry id="function.array-push">
    <refnamediv>
@@ -63,6 +63,13 @@
       </screen>
      </example>
     </para>
+    <note>
+     <simpara>
+      If you use <function>array_push</function> to add one element to the
+      array it's better to use <literal>$array[] = </literal> because in that
+      way there is no overhead of calling a function.
+     </simpara>
+    </note>
     <para>
      See also <function>array_pop</function>,
      <function>array_shift</function>, and

Reply via email to