mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00

For rationale, see https://github.com/php/php-src/pull/6787 Make extension checks lowercase, add a special case for opcache that has internal name not matching .so filename. Extensions migrated in part 2: * dom * exif * fileinfo * ffi
28 lines
582 B
PHP
28 lines
582 B
PHP
--TEST--
|
|
Test count nodes in DOMNamedNodeMap
|
|
--CREDITS--
|
|
Andreas Treichel <gmblar+github@gmail.com>
|
|
--EXTENSIONS--
|
|
dom
|
|
--FILE--
|
|
<?php
|
|
|
|
$document = new DomDocument();
|
|
$root = $document->createElement('root');
|
|
$document->appendChild($root);
|
|
for($i = 0; $i < 5; $i++) {
|
|
$root->setAttribute('attribute-' . $i, 'value-' . $i);
|
|
}
|
|
for($i = 0; $i < 7; $i++) {
|
|
$item = $document->createElement('item');
|
|
$root->appendChild($item);
|
|
}
|
|
var_dump($root->attributes->length);
|
|
var_dump($root->attributes->count());
|
|
var_dump(count($root->attributes));
|
|
|
|
?>
|
|
--EXPECT--
|
|
int(5)
|
|
int(5)
|
|
int(5)
|