cvs: phpdoc /en/functions array.xml

From: Date: Sun, 02 Sep 2001 17:47:22 +0000
Subject: cvs: phpdoc /en/functions array.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969337403@lists.php.net to get a copy of this message
jeroen Sun Sep 2 13:47:22 2001 EDT Modified files: /phpdoc/en/functions array.xml Log: Reworded count() a bit, and a very little bit of WS (sorry for mixing) Index: phpdoc/en/functions/array.xml diff -u phpdoc/en/functions/array.xml:1.89 phpdoc/en/functions/array.xml:1.90 --- phpdoc/en/functions/array.xml:1.89 Sun Sep 2 09:27:42 2001 +++ phpdoc/en/functions/array.xml Sun Sep 2 13:47:22 2001 @@ -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 @@ </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;

« previous php.doc (#969337403) next »