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