xref: /PHP-8.2/ext/dom/tests/bug49490.phpt (revision bd9f4fa6)
1--TEST--
2Bug #49490 (XPath namespace prefix conflict).
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7$doc = new DOMDocument();
8$doc->loadXML('<prefix:root xmlns:prefix="urn:a" />');
9
10$xp = new DOMXPath($doc);
11$xp->registerNamespace('prefix', 'urn:b');
12
13echo($xp->query('//prefix:root', null, false)->length . "\n");
14
15?>
16--EXPECT--
170
18