reference/array/functions/array-walk-recursive.xml
cec5275f23d2db648df30a5702b378044431be97
cec5275f23d2db648df30a5702b378044431be97
...
...
@@ -1,4 +1,4 @@
1
-
<?xml version='1.0' encoding='iso-8859-1'?>
1
+
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
3
<refentry xml:id="function.array-walk-recursive" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
...
...
@@ -8,14 +8,14 @@
8
8
<refsect1 role="description">
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
-
<type>bool</type><methodname>array_walk_recursive</methodname>
12
-
<methodparam><type>array</type><parameter role="reference">input</parameter></methodparam>
13
-
<methodparam><type>callback</type><parameter>funcname</parameter></methodparam>
14
-
<methodparam choice="opt"><type>mixed</type><parameter>userdata</parameter></methodparam>
11
+
<type>true</type><methodname>array_walk_recursive</methodname>
12
+
<methodparam><type class="union"><type>array</type><type>object</type></type><parameter role="reference">array</parameter></methodparam>
13
+
<methodparam><type>callable</type><parameter>callback</parameter></methodparam>
14
+
<methodparam choice="opt"><type>mixed</type><parameter>arg</parameter><initializer>&null;</initializer></methodparam>
15
15
</methodsynopsis>
16
16
<para>
17
-
Applies the user-defined function <parameter>funcname</parameter> to each
18
-
element of the <parameter>input</parameter> array. This function will recur
17
+
Applies the user-defined <parameter>callback</parameter> function to each
18
+
element of the <parameter>array</parameter>. This function will recurse
19
19
into deeper arrays.
20
20
</para>
21
21
</refsect1>
...
...
@@ -24,7 +24,7 @@
24
24
<para>
25
25
<variablelist>
26
26
<varlistentry>
27
-
<term><parameter>input</parameter></term>
27
+
<term><parameter>array</parameter></term>
28
28
<listitem>
29
29
<para>
30
30
The input array.
...
...
@@ -32,18 +32,18 @@
32
32
</listitem>
33
33
</varlistentry>
34
34
<varlistentry>
35
-
<term><parameter>funcname</parameter></term>
35
+
<term><parameter>callback</parameter></term>
36
36
<listitem>
37
37
<para>
38
-
Typically, <parameter>funcname</parameter> takes on two parameters.
39
-
The <parameter>input</parameter> parameter's value being the first, and
38
+
Typically, <parameter>callback</parameter> takes on two parameters.
39
+
The <parameter>array</parameter> parameter's value being the first, and
40
40
the key/index second.
41
41
</para>
42
42
<note>
43
43
<para>
44
-
If <parameter>funcname</parameter> needs to be working with the
44
+
If <parameter>callback</parameter> needs to be working with the
45
45
actual values of the array, specify the first parameter of
46
-
<parameter>funcname</parameter> as a
46
+
<parameter>callback</parameter> as a
47
47
<link linkend="language.references">reference</link>. Then,
48
48
any changes made to those elements will be made in the
49
49
original array itself.
...
...
@@ -52,12 +52,12 @@
52
52
</listitem>
53
53
</varlistentry>
54
54
<varlistentry>
55
-
<term><parameter>userdata</parameter></term>
55
+
<term><parameter>arg</parameter></term>
56
56
<listitem>
57
57
<para>
58
-
If the optional <parameter>userdata</parameter> parameter is supplied,
59
-
it will be passed as the third parameter to the callback
60
-
<parameter>funcname</parameter>.
58
+
If the optional <parameter>arg</parameter> parameter is supplied,
59
+
it will be passed as the third parameter to the
60
+
<parameter>callback</parameter>.
61
61
</para>
62
62
</listitem>
63
63
</varlistentry>
...
...
@@ -69,9 +69,29 @@
69
69
<refsect1 role="returnvalues">
70
70
&reftitle.returnvalues;
71
71
<para>
72
-
&return.success;
72
+
&return.true.always;
73
73
</para>
74
74
</refsect1>
75
+
76
+
<refsect1 role="changelog">
77
+
&reftitle.changelog;
78
+
<para>
79
+
<informaltable>
80
+
<tgroup cols="2">
81
+
<thead>
82
+
<row>
83
+
<entry>&Version;</entry>
84
+
<entry>&Description;</entry>
85
+
</row>
86
+
</thead>
87
+
<tbody>
88
+
&return.type.true;
89
+
</tbody>
90
+
</tgroup>
91
+
</informaltable>
92
+
</para>
93
+
</refsect1>
94
+
75
95
<refsect1 role="examples">
76
96
&reftitle.examples;
77
97
<para>
...
...
@@ -101,7 +121,7 @@ sour holds lemon
101
121
]]>
102
122
</screen>
103
123
<para>
104
-
You may notice that the key 'sweet' is never displayed. Any key that holds an
124
+
You may notice that the key '<literal>sweet</literal>' is never displayed. Any key that holds an
105
125
<type>array</type> will not be passed to the function.
106
126
</para>
107
127
</example>
...
...
@@ -112,7 +132,6 @@ sour holds lemon
112
132
<para>
113
133
<simplelist>
114
134
<member><function>array_walk</function></member>
115
-
<member>&seealso.callback;</member>
116
135
</simplelist>
117
136
</para>
118
137
</refsect1>
119
138