1--TEST--
2$innerHTML cache invalidation
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$dom = Dom\XMLDocument::createFromString('<root><a/><a/><a/></root>');
9$els = $dom->getElementsByTagName('a');
10var_dump($els[0]->tagName);
11
12$dom->documentElement->innerHTML = '<b/>';
13
14echo $dom->saveXML(), "\n";
15var_dump($els);
16var_dump($els[0]?->tagName);
17
18?>
19--EXPECT--
20string(1) "a"
21<?xml version="1.0" encoding="UTF-8"?>
22<root><b/></root>
23object(Dom\HTMLCollection)#2 (1) {
24  ["length"]=>
25  int(0)
26}
27NULL
28