Doc #69701 [Opn->Nab]: Example provided for the count function acts on the wrong element
| From: | cmb@php.net | Date: | Sun, 24 May 2015 21:38:02 +0000 |
| Subject: | Doc #69701 [Opn->Nab]: Example provided for the count function acts on the wrong element | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-12363@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69701&edit=1
ID: 69701
Updated by: cmb@php.net
Reported by: malcolm at notyourhomework dot net
Summary: Example provided for the count function acts on the
wrong element
-Status: Open
+Status: Not a bug
Type: Documentation Problem
Package: SimpleXML related
Operating System: Mac OS X
PHP Version: Irrelevant
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
The example is correct; the documentation states:
| This method counts the number of children of an element.
Previous Comments:
------------------------------------------------------------------------
[2015-05-24 21:23:36] malcolm at notyourhomework dot net
Description:
------------
---
From manual page: http://www.php.net/simplexmlelement.count
---
The count example script operates on the person element, It should be operating on the child
element.
presently it is
$person->count()
it should be
$person->child->count()
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69701&edit=1