[php-src] PR #15047: Add tidyNode::getNextSibling() and tidyNode::getPreviousSibling()
| From: | nielsdos | Date: | Sat, 20 Jul 2024 23:22:01 +0000 |
| Subject: | [php-src] PR #15047: Add tidyNode::getNextSibling() and tidyNode::getPreviousSibling() | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-27395@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/15047
Author: nielsdos
First commit refactors the code a bit to make implementation easier.
Second commit actually implements it:
These get the next and previous sibling nodes, respectively.
We can already kind of do this by using the $child array, but that's
inconvenient when actually walking the tree by only using node
instances. Since the class is final, there is no BC break here.