Added comment about array_walk and PHP functions.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@51404 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Damien Seguy 2001-07-13 12:24:11 +00:00
parent 80eae3546c
commit 489af1563c

View file

@ -1548,12 +1548,16 @@ function array_values ($arr) {
</funcprototype>
</funcsynopsis>
<simpara>
Applies the function named by <parameter>func</parameter> to each
element of <parameter>arr</parameter>.
Applies the user-defined function named by <parameter>func</parameter>
to each element of <parameter>arr</parameter>.
<parameter>func</parameter> will be passed array value as the
first parameter and array key as the second parameter. If
<parameter>userdata</parameter> is supplied, it will be passed as
the third parameter to the user function.
the third parameter to the user function. <parameter>func</parameter>
must be a user-defined function, and can't be a native PHP function.
Thus, you can't use <function>array_walk</function> straight with
<function>str2lower</function>, you must build a user-defined function
with it first, and pass this function as argument.
</simpara>
<simpara>
If <parameter>func</parameter> requires more than two or three