function simple_html_dom_node::next_sibling in simplehtmldom API 6
Same name and namespace in other branches
- 5.2 simplehtmldom/simple_html_dom.php \simple_html_dom_node::next_sibling()
- 7 simplehtmldom/simple_html_dom.php \simple_html_dom_node::next_sibling()
1 call to simple_html_dom_node::next_sibling()
- simple_html_dom_node::nextSibling in simplehtmldom/
simple_html_dom.php
File
- simplehtmldom/
simple_html_dom.php, line 144
Class
Code
function next_sibling() {
if ($this->parent === null) {
return null;
}
$idx = 0;
$count = count($this->parent->children);
while ($idx < $count && $this !== $this->parent->children[$idx]) {
++$idx;
}
if (++$idx >= $count) {
return null;
}
return $this->parent->children[$idx];
}