From 8748886df0388fdcfba25f1e670270f04183a652 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Mon, 1 Nov 2004 21:11:40 +0000 Subject: [PATCH] - Update git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@171889 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/array/functions/count.xml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/reference/array/functions/count.xml b/reference/array/functions/count.xml index ed3bb8ff63..c0d051e94d 100644 --- a/reference/array/functions/count.xml +++ b/reference/array/functions/count.xml @@ -1,5 +1,5 @@ - + @@ -15,8 +15,15 @@ Returns the number of elements in var, - which is typically an array (since anything else will have - one element). + which is typically an array (since anything other than objects + will have one element). + + + 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. If var is not an array, 1 will