Doc #67806 [NEW]: DOMNodelist::item actually returns DOMElement
| From: | danielklein at airpost dot net | Date: | Fri, 08 Aug 2014 12:40:55 +0000 |
| Subject: | Doc #67806 [NEW]: DOMNodelist::item actually returns DOMElement | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-11419@lists.php.net to get a copy of this message | ||
From: danielklein at airpost dot net
Operating system:
PHP version: 5.4.31
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:DOMNodelist::item actually returns DOMElement
Description:
------------
DOMNodelist::item actually returns DOMElement, not DOMNode as stated in
the documentation. Since DOMElement extends DOMNode, this is not a huge
problem in that all the methods and properties will work as documented
but the programmer is potentially missing out on a lot of useful
features.
Bug #42451 is also about this issue (but the reverse, asking for PHP to
match the documentation). Perhaps a note in DOMNodelist::item explaining
that as DOMElement extends DOMNode that it is actually correct?
--
Edit bug report at https://bugs.php.net/bug.php?id=67806&edit=1
--