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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: martin at complinet dot com
New email:
PHP Version: OS:

 

 [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: Thu May 08 01:01:27 2025 UTC