git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@171889 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Marcus Boerger 2004-11-01 21:11:40 +00:00
parent 597c9e6b87
commit 8748886df0

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.12 $ -->
<!-- $Revision: 1.13 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.count">
<refnamediv>
@ -15,8 +15,15 @@
</methodsynopsis>
<para>
Returns the number of elements in <parameter>var</parameter>,
which is typically an <type>array</type> (since anything else will have
one element).
which is typically an <type>array</type> (since anything other than objects
will have one element).
</para>
<para>
For objects it returns the number of non static properties not taking
visibility into account. If you have SPL starting from PHP 5.1 you can
hook into coun() by implementing interface Countable. That interface
has exactly one method named count() which delivers the return value
for the count() function.
</para>
<para>
If <parameter>var</parameter> is not an array, <literal>1</literal> will