mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Reworded count() a bit, and a very little bit of WS (sorry for mixing)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@56555 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
63e9bc2e15
commit
a0fb1babfc
1 changed files with 18 additions and 18 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.89 $ -->
|
||||
<!-- $Revision: 1.90 $ -->
|
||||
<reference id="ref.array">
|
||||
<title>Array Functions</title>
|
||||
<titleabbrev>Arrays</titleabbrev>
|
||||
|
@ -1819,32 +1819,32 @@ $result = compact ("event", "nothing_here", $location_vars);
|
|||
</funcsynopsis>
|
||||
<para>
|
||||
Returns the number of elements in <parameter>var</parameter>,
|
||||
which is typically an array (since anything else will have one
|
||||
element).
|
||||
which is typically an <type>array</type> (since anything else will have
|
||||
one element).
|
||||
</para>
|
||||
<para>
|
||||
Returns 1 if the variable is not an array.
|
||||
If <parameter>var</parameter> is not an array, <literal>1</literal> will
|
||||
be returned (exception: <literal>count(&null;)</literal> equals
|
||||
<literal>0</literal>).
|
||||
</para>
|
||||
<warning>
|
||||
<para>
|
||||
<function>count</function> may return 0 for a variable that
|
||||
isn't set, but it may also return 0 for a variable that has
|
||||
been initialized with an empty array. Use
|
||||
<function>isset</function> to test if a variable is set.
|
||||
</para>
|
||||
</warning>
|
||||
<para>
|
||||
Returns 0 if the variable is not set or is an empty array.
|
||||
<warning>
|
||||
<para>
|
||||
<function>count</function> may return 0 for a variable that
|
||||
isn't set, but it may also return 0 for a variable that has
|
||||
been initialized with an empty array. Use
|
||||
<function>isset</function> to test if a variable is set.
|
||||
</para>
|
||||
</warning>
|
||||
Please see the <link linkend="language.types.array">Arrays</link>
|
||||
section of the manual for a detailed explanation of how arrays are
|
||||
implemented and used in PHP.
|
||||
</para>
|
||||
<para>
|
||||
Please see the <link linkend="language.types.array">Arrays</link>
|
||||
section of the manual for a detailed explanation of how arrays are
|
||||
implemented and used in PHP.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>count</function> example</title>
|
||||
<programlisting role="php">
|
||||
<!-- TODO: examples about count(null), count(false), count(object).. -->
|
||||
$a[0] = 1;
|
||||
$a[1] = 3;
|
||||
$a[2] = 5;
|
||||
|
|
Loading…
Reference in a new issue