1<?php
2function dumpNodeList($nodeList) {
3    echo "Node list length: ";
4    var_dump($nodeList->length);
5    foreach ($nodeList as $node) {
6        echo "\t{$node->nodeName} {$node->textContent}\n";
7    }
8    echo "---\n";
9}
10