colder Mon May 29 16:03:19 2006 UTC
Modified files:
/phpdoc/en/reference/array/functions prev.xml next.xml current.xml
Log:
Fix #37572 (Return value can be false on success)
http://cvs.php.net/viewcvs.cgi/phpdoc/en/reference/array/functions/prev.xml?r1=1.8&r2=1.9&diff_format=u
Index: phpdoc/en/reference/array/functions/prev.xml
diff -u phpdoc/en/reference/array/functions/prev.xml:1.8
phpdoc/en/reference/array/functions/prev.xml:1.9
--- phpdoc/en/reference/array/functions/prev.xml:1.8 Wed Mar 29 03:48:05 2006
+++ phpdoc/en/reference/array/functions/prev.xml Mon May 29 16:03:18 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.8 $ -->
+<!-- $Revision: 1.9 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.prev">
<refnamediv>
@@ -16,18 +16,18 @@
Returns the array value in the previous place that's pointed to by
the internal array pointer, or &false; if there are no more
elements.
- <warning>
- <para>
- If the array contains empty elements then this function will
- return a value which evaluates to &false; for these elements as well
- (see <link linkend="language.types.boolean.casting">converting to
boolean</link>
- and <link linkend="types.comparisons">the type comparison tables</link>
- for more information).
- To properly traverse an array which may contain empty elements
- see the <function>each</function> function.
- </para>
- </warning>
</para>
+
+ &return.falseproblem;
+
+ <note>
+ <simpara>
+ You won't be able to distinguish the beginning of an array from a
+ <type>boolean</type> &false; element. To properly traverse an array
+ which may contain &false; elements, see the <function>each</function>
+ function.
+ </simpara>
+ </note>
<para>
<function>prev</function> behaves just like
<function>next</function>, except it rewinds the internal array
@@ -52,7 +52,8 @@
</para>
<para>
See also <function>current</function>, <function>end</function>,
- <function>next</function>, and <function>reset</function>.
+ <function>next</function>, <function>reset</function>,
+ and <function>each</function>.
</para>
</refsect1>
</refentry>
http://cvs.php.net/viewcvs.cgi/phpdoc/en/reference/array/functions/next.xml?r1=1.8&r2=1.9&diff_format=u
Index: phpdoc/en/reference/array/functions/next.xml
diff -u phpdoc/en/reference/array/functions/next.xml:1.8
phpdoc/en/reference/array/functions/next.xml:1.9
--- phpdoc/en/reference/array/functions/next.xml:1.8 Wed Mar 29 03:48:05 2006
+++ phpdoc/en/reference/array/functions/next.xml Mon May 29 16:03:18 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.8 $ -->
+<!-- $Revision: 1.9 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.next">
<refnamediv>
@@ -26,19 +26,18 @@
advances the internal array pointer by one. If advancing the
internal array pointer results in going beyond the end of the
element list, <function>next</function> returns &false;.
- <warning>
- <para>
- If the array contains empty elements, or elements that have a key
- value of 0 then this function will return a value which
- evaluates to &false; for these elements as well (see <link
- linkend="language.types.boolean.casting">converting to boolean</link>
- and <link linkend="types.comparisons">the type comparison tables</link>
- for more information). To properly traverse an array which
- may contain empty elements or elements with key values of 0 see the
- <function>each</function> function.
- </para>
- </warning>
</para>
+
+ &return.falseproblem;
+
+ <note>
+ <simpara>
+ You won't be able to distinguish the end of an array from a
+ <type>boolean</type> &false; element. To properly traverse an array
+ which may contain &false; elements, see the <function>each</function>
+ function.
+ </simpara>
+ </note>
<para>
<example>
<title>Example use of <function>next</function> and friends</title>
@@ -59,7 +58,8 @@
<para>
See also
<function>current</function>, <function>end</function>,
- <function>prev</function>, and <function>reset</function>.
+ <function>prev</function>, <function>reset</function>,
+ and <function>each</function>.
</para>
</refsect1>
</refentry>
http://cvs.php.net/viewcvs.cgi/phpdoc/en/reference/array/functions/current.xml?r1=1.10&r2=1.11&diff_format=u
Index: phpdoc/en/reference/array/functions/current.xml
diff -u phpdoc/en/reference/array/functions/current.xml:1.10
phpdoc/en/reference/array/functions/current.xml:1.11
--- phpdoc/en/reference/array/functions/current.xml:1.10 Wed Mar 29
03:48:05 2006
+++ phpdoc/en/reference/array/functions/current.xml Mon May 29 16:03:18 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.10 $ -->
+<!-- $Revision: 1.11 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.current">
<refnamediv>
@@ -23,22 +23,18 @@
internal pointer. It does not move the pointer in any way. If the
internal pointer points beyond the end of the elements list,
<function>current</function> returns &false;.
- <warning>
- <para>
- If the array contains empty elements (0 or "", the empty
- string) then this function will return a value which
- evaluates to &false; for these elements as well (see <link
- linkend="language.types.boolean.casting">converting to boolean</link>
- and <link linkend="types.comparisons">the type comparison tables</link>
- for more information).
- This makes it impossible to
- determine if you are really at the end of the list in such
- an array using <function>current</function>. To properly
- traverse an array that may contain empty elements, use the
- <function>each</function> function.
- </para>
- </warning>
</para>
+
+ &return.falseproblem;
+
+ <note>
+ <simpara>
+ You won't be able to distinguish the end of an array from a
+ <type>boolean</type> &false; element. To properly traverse an array
+ which may contain &false; elements, see the <function>each</function>
+ function.
+ </simpara>
+ </note>
<para>
<example>
<title>Example use of <function>current</function> and friends</title>
@@ -59,8 +55,8 @@
</para>
<para>
See also <function>end</function>, <function>key</function>,
- <function>next</function>, <function>prev</function>, and
- <function>reset</function>.
+ <function>next</function>, <function>prev</function>,
+ <function>reset</function>, and <function>each</function>.
</para>
</refsect1>
</refentry>