php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #79273 DOMNode: Class synopsis lacks info about nullable properties
Submitted: 2020-02-13 20:09 UTC Modified: 2020-02-28 22:35 UTC
From: ca at lsp dot net Assigned: beberlei (profile)
Status: Closed Package: DOM XML related
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ca at lsp dot net
New email:
PHP Version: OS:

 

 [2020-02-13 20:09 UTC] ca at lsp dot net
Description:
------------
---
From manual page: https://php.net/class.domnode
---

`DOMNode` has several properties that can be `NULL`:

* nodeValue
* parentNode
* firstChild
* lastChild
* previousSibling
* nextSibling
* attributes
* ownerDocument

The class synopsis, however, doesn't provide this important information.

Expected result:
----------------
public ?string $nodeValue ;
public readonly int $nodeType ;
public readonly ?DOMNode $parentNode ;
public readonly DOMNodeList $childNodes ;
public readonly ?DOMNode $firstChild ;
public readonly ?DOMNode $lastChild ;
public readonly ?DOMNode $previousSibling ;
public readonly ?DOMNode $nextSibling ;
public readonly ?DOMNamedNodeMap $attributes ;
public readonly ?DOMDocument $ownerDocument ;

Actual result:
--------------
public string $nodeValue ;
public readonly int $nodeType ;
public readonly DOMNode $parentNode ;
public readonly DOMNodeList $childNodes ;
public readonly DOMNode $firstChild ;
public readonly DOMNode $lastChild ;
public readonly DOMNode $previousSibling ;
public readonly DOMNode $nextSibling ;
public readonly DOMNamedNodeMap $attributes ;
public readonly DOMDocument $ownerDocument ;

Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-02-28 22:35 UTC] beberlei@php.net
-Assigned To: +Assigned To: beberlei
 [2020-02-28 23:23 UTC] beberlei@php.net
The following pull request has been associated:

Patch Name: #79273: Document nullable properties on DOMDocument and DOMNode
On GitHub:  https://github.com/php/doc-en/pull/52
Patch:      https://github.com/php/doc-en/pull/52.patch
 [2020-10-30 11:06 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=24219de95d129309f248f1e0874dcddc015bfbff
Log: Fix #79273: Correctly document nullable properties on DOMDocument and DOMNode
 [2020-10-30 11:06 UTC] phpdocbot@php.net
-Status: Assigned +Status: Closed
 [2020-10-30 22:35 UTC] phpdocbot@php.net
Automatic comment on behalf of mumumu
Revision: http://git.php.net/?p=doc/ja.git;a=commit;h=1a999520e013363e797449c5a69fb2d913587d01
Log: Fix #79273: Correctly document nullable properties on DOMDocument
 [2020-12-30 11:58 UTC] nikic@php.net
Automatic comment on behalf of mumumu
Revision: http://git.php.net/?p=doc/ja.git;a=commit;h=bd127a7fbbf82550113140db46082b3e73b504ea
Log: Fix #79273: Correctly document nullable properties on DOMDocument
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun May 11 03:01:27 2025 UTC