jimw Thu Dec 6 20:42:01 2001 EDT
Modified files:
/phpdoc/en/functions array.xml
Log:
array_walk: note how to pass object/method as callback, and unpredictable behavior
of modifying array inside the callback.
Index: phpdoc/en/functions/array.xml
diff -u phpdoc/en/functions/array.xml:1.131 phpdoc/en/functions/array.xml:1.132
--- phpdoc/en/functions/array.xml:1.131 Fri Nov 30 17:35:12 2001
+++ phpdoc/en/functions/array.xml Thu Dec 6 20:42:01 2001
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.131 $ -->
+<!-- $Revision: 1.132 $ -->
<reference id="ref.array">
<title>Array Functions</title>
<titleabbrev>Arrays</titleabbrev>
@@ -1921,6 +1921,7 @@
<function>str2lower</function>, you must build a user-defined function
with it first, and pass this function as argument.
</simpara>
+ ¬e.func-callback;
<simpara>
If <parameter>func</parameter> requires more than two or three
arguments, depending on <parameter>userdata</parameter>, a
@@ -1937,6 +1938,10 @@
<parameter>func</parameter> should be passed by reference. Then
any changes made to those elements will be made in the array
itself.
+ </para>
+ <para>
+ Modifying the array from inside <parameter>func</parameter>
+ may cause unpredictable behavior.
</para>
</note>
<note>