1--TEST--
2Test count nodes in DOMNodeList
3--CREDITS--
4Andreas Treichel <gmblar+github@gmail.com>
5--EXTENSIONS--
6dom
7--FILE--
8<?php
9
10$document = new DomDocument();
11$root = $document->createElement('root');
12$document->appendChild($root);
13for($i = 0; $i < 5; $i++) {
14    $root->setAttribute('attribute-' . $i, 'value-' . $i);
15}
16for($i = 0; $i < 7; $i++) {
17    $item = $document->createElement('item');
18    $root->appendChild($item);
19}
20var_dump($root->childNodes->length);
21var_dump($root->childNodes->count());
22var_dump(count($root->childNodes));
23
24?>
25--EXPECT--
26int(7)
27int(7)
28int(7)
29