mirror of
https://github.com/php/php-src.git
synced 2026-04-20 22:41:20 +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
29 lines
639 B
PHP
29 lines
639 B
PHP
--TEST--
|
|
Bug #42082 (NodeList length zero should be empty)
|
|
--EXTENSIONS--
|
|
dom
|
|
--FILE--
|
|
<?php
|
|
$doc = new DOMDocument();
|
|
$xpath = new DOMXPath($doc);
|
|
$nodes = $xpath->query('*');
|
|
echo get_class($nodes), "\n";
|
|
var_dump($nodes->length);
|
|
$length = $nodes->length;
|
|
var_dump(empty($nodes->length), empty($length));
|
|
|
|
$doc->loadXML("<element></element>");
|
|
var_dump($doc->firstChild->nodeValue, empty($doc->firstChild->nodeValue), isset($doc->firstChild->nodeValue));
|
|
var_dump(empty($doc->nodeType), empty($doc->firstChild->nodeType))
|
|
?>
|
|
--EXPECT--
|
|
DOMNodeList
|
|
int(0)
|
|
bool(true)
|
|
bool(true)
|
|
string(0) ""
|
|
bool(true)
|
|
bool(true)
|
|
bool(false)
|
|
bool(false)
|