1--TEST--
2Crash in childNodes iterator current()
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$dom = new DOMDocument;
9$dom->loadXML('<foo>foo1</foo>');
10
11$nodes = $dom->documentElement->childNodes;
12$iter = $nodes->getIterator();
13
14var_dump($iter->valid());
15var_dump($iter->current()?->wholeText);
16$iter->next();
17var_dump($iter->valid());
18var_dump($iter->current()?->wholeText);
19
20?>
21--EXPECT--
22bool(true)
23string(4) "foo1"
24bool(false)
25NULL
26