I realize DOMNodeList is meant to be a special type of "live" readonly reference list, but out of curiosity, how does it get constructed by other classes? For example, how does DOMNode "getBy*" functions construct a DOMNodeList?
//for example NOT with array of nodes
$doc=new DOMDocument();
$doc->loadHTML("<div></div><div></div>");
$list=new DOMNodeList([$doc->getElementsByTagName('div')->item(0)]);
echo $list->length;//doesn't work; empty; prints 0