reference/array/functions/array-chunk.xml
214519fdbdd6bfe2942775d3554fa8f440f85404
...
...
@@ -11,12 +11,12 @@
11
11
<methodsynopsis>
12
12
<type>array</type><methodname>array_chunk</methodname>
13
13
<methodparam><type>array</type><parameter>array</parameter></methodparam>
14
-
<methodparam><type>int</type><parameter>size</parameter></methodparam>
14
+
<methodparam><type>int</type><parameter>length</parameter></methodparam>
15
15
<methodparam choice="opt"><type>bool</type><parameter>preserve_keys</parameter><initializer>&false;</initializer></methodparam>
16
16
</methodsynopsis>
17
17
<para>
18
-
Chunks an array into arrays with <parameter>size</parameter> elements.
19
-
The last chunk may contain less than <parameter>size</parameter> elements.
18
+
Chunks an array into arrays with <parameter>length</parameter> elements.
19
+
The last chunk may contain less than <parameter>length</parameter> elements.
20
20
</para>
21
21
</refsect1>
22
22

...
...
@@ -35,7 +35,7 @@
35
35
</varlistentry>
36
36

37
37
<varlistentry>
38
-
<term><parameter>size</parameter></term>
38
+
<term><parameter>length</parameter></term>
39
39
<listitem>
40
40
<para>
41
41
The size of each chunk
...
...
@@ -61,18 +61,43 @@
61
61
&reftitle.returnvalues;
62
62
<para>
63
63
Returns a multidimensional numerically indexed array, starting with zero,
64
-
with each dimension containing <parameter>size</parameter> elements.
64
+
with each dimension containing <parameter>length</parameter> elements.
65
65
</para>
66
66
</refsect1>
67
67

68
68
<refsect1 role="errors">
69
69
&reftitle.errors;
70
70
<para>
71
-
If <parameter>size</parameter> is less than 1
72
-
<constant>E_WARNING</constant> will be thrown and &null; returned.
71
+
If <parameter>length</parameter> is less than <literal>1</literal>,
72
+
a <classname>ValueError</classname> will be thrown.
73
73
</para>
74
74
</refsect1>
75
75

76
+
<refsect1 role="changelog">
77
+
&reftitle.changelog;
78
+
<informaltable>
79
+
<tgroup cols="2">
80
+
<thead>
81
+
<row>
82
+
<entry>&Version;</entry>
83
+
<entry>&Description;</entry>
84
+
</row>
85
+
</thead>
86
+
<tbody>
87
+
<row>
88
+
<entry>8.0.0</entry>
89
+
<entry>
90
+
If <parameter>length</parameter> is less than <literal>1</literal>,
91
+
a <classname>ValueError</classname> will be thrown now;
92
+
previously, an error of level <constant>E_WARNING</constant>
93
+
has been raised instead, and the function returned &null;.
94
+
</entry>
95
+
</row>
96
+
</tbody>
97
+
</tgroup>
98
+
</informaltable>
99
+
</refsect1>
100
+

76
101
<refsect1 role="examples">
77
102
&reftitle.examples;
78
103
<para>
...
...
@@ -146,7 +171,6 @@ Array
146
171
</refsect1>
147
172

148
173
</refentry>
149
-

150
174
<!-- Keep this comment at the end of the file
151
175
Local variables:
152
176
mode: sgml
153
177