#50362 [Opn->Bgs]: documentation bug DOMAttr DOMNode
| From: | seld@php.net | Date: | Thu, 17 Dec 2009 12:39:47 +0000 |
| Subject: | #50362 [Opn->Bgs]: documentation bug DOMAttr DOMNode | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-3502@lists.php.net to get a copy of this message | ||
ID: 50362
Updated by: seld@php.net
Reported By: tlaguz at wp dot pl
-Status: Open
+Status: Bogus
Bug Type: Documentation problem
Operating System: Vista x64
PHP Version: 5.2.11
New Comment:
Thank you for reporting but in this case the documentation is correct,
DOMAttr extends from DOMNode. In your case, item() returned a DOMAttr,
but in other cases it might return another class (there are many) that
extends from DOMNode, therefore changing the return value to DOMAttr
wouldn't make sense.
Previous Comments:
------------------------------------------------------------------------
[2009-12-11 22:18:16] daniel dot egeberg at gmail dot com
That's the case in PHP as well.
daniel@daniel-laptop:~$ php -r "var_dump(is_subclass_of('DOMAttr',
'DOMNode'));"
bool(true)
which is also documented in the PHP manual:
http://php.net/manual/en/class.domattr.php
------------------------------------------------------------------------
[2009-12-10 09:59:58] Dormilich at netscape dot net
according to the DOM
(http://www.w3.org/TR/DOM-Level-2-Core/idl-definitions.html),
DOMNamedNodeMap::item returns a DOMNode, which is the parent of DOMAttr.
------------------------------------------------------------------------
[2009-12-02 19:09:30] tlaguz at wp dot pl
Description:
------------
Now:
DOMNode DOMNamedNodeMap::item ( int $index )
It should be:
DOMAttr DOMNamedNodeMap::item ( int $index )
My PHP returns that value (DOMAttr).
Reproduce code:
---------------
---
From manual page: domnamednodemap.item#Description
---
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50362&edit=1