cvs: phpdoc-de /reference/array/functions count.xml

From: Date: Thu, 18 Aug 2005 18:24:35 +0000
Subject: cvs: phpdoc-de /reference/array/functions count.xml
Groups: php.doc.de 
Request: Send a blank email to doc-de+get-1394@lists.php.net to get a copy of this message
theseer Thu Aug 18 14:24:35 2005 EDT Modified files: /phpdoc-de/reference/array/functions count.xml Log: Überarbeitet gemäß Vorschlag von Nico Edtinger (alpha[at]rss.at) http://cvs.php.net/diff.php/phpdoc-de/reference/array/functions/count.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-de/reference/array/functions/count.xml diff -u phpdoc-de/reference/array/functions/count.xml:1.5 phpdoc-de/reference/array/functions/count.xml:1.6 --- phpdoc-de/reference/array/functions/count.xml:1.5 Sun Jun 29 03:44:02 2003 +++ phpdoc-de/reference/array/functions/count.xml Thu Aug 18 14:24:34 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <!-- EN-Revision: 1.5 Maintainer: tom Status: ready --> <refentry id="function.count"> <refnamediv> @@ -11,6 +11,7 @@ <methodsynopsis> <type>int</type><methodname>count</methodname> <methodparam><type>mixed</type><parameter>var</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>mode</parameter></methodparam> </methodsynopsis> <para> Liefert die Anzahl von Elementen in <parameter>var</parameter>, @@ -18,9 +19,36 @@ ein Element enthält). </para> <para> - Ist <parameter>var</parameter> kein Array, wird <literal>1</literal> - zurückgegeben (Ausnahme: <literal>count(&null;)</literal> ist gleich - <literal>0</literal>). + Ist <parameter>var</parameter> kein Array oder Objekt mit Interface + Countable, wird <literal>1</literal> zurückgegeben (Ausnahme: + <literal>count(&null;)</literal> ist gleich <literal>0</literal>). + </para> + <para> + Für Objekte, wenn die <link linked="ref.spl">SPL</link> installiert + ist, gibt es die Möglichkeit das Interface Countable zu implementieren. + Dieses Interface besitzt die Methode <function>count</function>, die + den Rückgabewert für den Aufruf von <function>count</function> zurück + liefert. + </para> + <note> + <para> + Anmerkung: Der Parameter mode wurde mit PHP 4.2.0 hinzugefügt. + </para> + </note> + <para> + Wenn der optionale Paramter <parameter>mode</parameter> auf + <constant>COUNT_RECURSIVE</constant> gesetzt ist, wird rekursive + die Anzahl der Elemente ermittelt. Das ist nützlich um alle Elemente + eines mehr-dimensionalen Arrays zu ermitteln. + </para> + <warning> + <para> + count() kann keine unendliche Rekursion erkennen. + </para> + </warning> + <para> + Ist <parameter>mode</parameter> nicht spezifizier, wird + <constant>COUNT_NORMAL</constant> angenommen. </para> <warning> <para>

« previous php.doc.de (#1394) next »