php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #8048 Error in count function
Submitted: 2000-11-30 04:27 UTC Modified: 2001-01-22 20:45 UTC
From: martin at complinet dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.0.2 OS: Linux
Private report: No CVE-ID: None
 [2000-11-30 04:27 UTC] martin at complinet dot com
The manual page for the 'count' function says that arrays with null elements will be ignored. This is not true. If you try the example it returns 6 as opposed to 4 as stated. I have tested this on various systems and found the same result. 

Thank You,
	Martin

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-03 08:21 UTC] stas@php.net
Indeed, it always returns number of elements (it's coded
this way). Anybody knows why it's the other way in the manual?
 [2001-01-06 03:49 UTC] cynic@php.net
-> documentation problem
 [2001-01-22 20:45 UTC] jimw@php.net
bogus example removed.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 12:01:32 2025 UTC