simple_html_dom_node::dump_node PHP Method

dump_node() public method

Debugging function to dump a single dom node with a bunch of information about it.
public dump_node ( )
    function dump_node()
    {
        echo $this->tag;
        if (count($this->attr) > 0) {
            echo '(';
            foreach ($this->attr as $k => $v) {
                echo "[{$k}]=>\"" . $this->{$k} . '", ';
            }
            echo ')';
        }
        if (count($this->attr) > 0) {
            echo ' $_ (';
            foreach ($this->_ as $k => $v) {
                if (is_array($v)) {
                    echo "[{$k}]=>(";
                    foreach ($v as $k2 => $v2) {
                        echo "[{$k2}]=>\"" . $v2 . '", ';
                    }
                    echo ")";
                } else {
                    echo "[{$k}]=>\"" . $v . '", ';
                }
            }
            echo ")";
        }
        if (isset($this->text)) {
            echo " text: (" . $this->text . ")";
        }
        echo " children: " . count($this->children);
        echo " nodes: " . count($this->nodes);
        echo " tag_start: " . $this->tag_start;
        echo "\n";
    }