xref: /PHP-8.2/ext/dom/tests/bug75451.phpt (revision bd9f4fa6)
1--TEST--
2Bug #75451 (Assertion fails while foreach on empty xpath query)
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7$dom = new DOMDocument();
8$dom->loadXML('<root><child/></root>');
9$xpath = new DOMXpath($dom);
10foreach($xpath->query('/root/noexist') as $child) {
11    var_dump($child);
12}
13?>
14okey
15--EXPECT--
16okey
17