|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #69701 Example provided for the count function acts on the wrong element
Submitted: 2015-05-24 21:23 UTC Modified: 2015-05-24 21:38 UTC
From: malcolm at notyourhomework dot net Assigned: cmb (profile)
Status: Not a bug Package: SimpleXML related
PHP Version: Irrelevant OS: Mac OS X
Private report: No CVE-ID: None
 [2015-05-24 21:23 UTC] malcolm at notyourhomework dot net
From manual page:

The count example script operates on the person element, It should be operating on the child element. 

presently it is 


it should be 



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-05-24 21:38 UTC]
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2015-05-24 21:38 UTC]
The example is correct; the documentation states:

| This method counts the number of children of an element.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Dec 10 11:01:26 2023 UTC