mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +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
17 lines
333 B
PHP
17 lines
333 B
PHP
--TEST--
|
|
DOMNode::getNodePath()
|
|
--EXTENSIONS--
|
|
dom
|
|
--FILE--
|
|
<?php
|
|
$file = __DIR__.'/book.xml';
|
|
$doc = new DOMDocument();
|
|
$doc->load($file);
|
|
$nodes = $doc->getElementsByTagName('title');
|
|
foreach($nodes as $node) {
|
|
var_dump($node->getNodePath());
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
string(20) "/books/book[1]/title"
|
|
string(20) "/books/book[2]/title"
|