reference/array/functions/reset.xml
0a192fcd9cc43c0007de795063b4494974058992
...
...
@@ -9,7 +9,7 @@
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
11
<type>mixed</type><methodname>reset</methodname>
12
-
<methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
12
+
<methodparam><type class="union"><type>array</type><type>object</type></type><parameter role="reference">array</parameter></methodparam>
13
13
</methodsynopsis>
14
14
<para>
15
15
<function>reset</function> rewinds <parameter>array</parameter>'s internal
...
...
@@ -38,7 +38,26 @@
38
38
Returns the value of the first array element, or &false; if the array is
39
39
empty.
40
40
</para>
41
+
&return.falseproblem;
41
42
</refsect1>
43
+

44
+
<refsect1 role="changelog">
45
+
&reftitle.changelog;
46
+
<informaltable>
47
+
<tgroup cols="2">
48
+
<thead>
49
+
<row>
50
+
<entry>&Version;</entry>
51
+
<entry>&Description;</entry>
52
+
</row>
53
+
</thead>
54
+
<tbody>
55
+
&standard.changelog.calling-on-objects;
56
+
</tbody>
57
+
</tgroup>
58
+
</informaltable>
59
+
</refsect1>
60
+
42
61
<refsect1 role="examples">
43
62
&reftitle.examples;
44
63
<para>
...
...
@@ -68,6 +87,19 @@ echo current($array) . "<br />\n"; // "step one"
68
87
</example>
69
88
</para>
70
89
</refsect1>
90
+
<refsect1 role="notes">
91
+
&reftitle.notes;
92
+
<note>
93
+
<simpara>
94
+
The return value for an empty array is indistinguishable from
95
+
the return value in case of an array which has a <type>bool</type> &false;
96
+
first element. To properly check the value of the first element of an array
97
+
which may contain &false; elements, first check the <function>count</function>
98
+
of the array, or check that <function>key</function> is not
99
+
&null;, after calling <function>reset</function>.
100
+
</simpara>
101
+
</note>
102
+
</refsect1>
71
103
<refsect1 role="seealso">
72
104
&reftitle.seealso;
73
105
<para>
...
...
@@ -77,11 +109,11 @@ echo current($array) . "<br />\n"; // "step one"
77
109
<member><function>end</function></member>
78
110
<member><function>next</function></member>
79
111
<member><function>prev</function></member>
112
+
<member><function>array_key_first</function></member>
80
113
</simplelist>
81
114
</para>
82
115
</refsect1>
83
116
</refentry>
84
-

85
117
<!-- Keep this comment at the end of the file
86
118
Local variables:
87
119
mode: sgml
88
120