empty values (such as 0, '', etc...) == FALSE, but !== FALSE.

(relates to bug #20394)


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@210354 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
TAKAGI Masahiro 2006-03-29 03:48:05 +00:00
parent 085d8c088c
commit 274def2717
3 changed files with 18 additions and 8 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.9 $ -->
<!-- $Revision: 1.10 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.current">
<refnamediv>
@ -26,8 +26,12 @@
<warning>
<para>
If the array contains empty elements (0 or "", the empty
string) then this function will return &false;
for these elements as well. This makes it impossible to
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

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.7 $ -->
<!-- $Revision: 1.8 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.next">
<refnamediv>
@ -29,8 +29,11 @@
<warning>
<para>
If the array contains empty elements, or elements that have a key
value of 0 then this function will return &false;
for these elements as well. To properly traverse an array which
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>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.7 $ -->
<!-- $Revision: 1.8 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.prev">
<refnamediv>
@ -19,7 +19,10 @@
<warning>
<para>
If the array contains empty elements then this function will
return &false; for these elements as well.
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>