We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65fbf47 commit ed246daCopy full SHA for ed246da
ext/dom/tests/modern/common/innerHTML_cache_invalidation.phpt
@@ -0,0 +1,27 @@
1
+--TEST--
2
+$innerHTML cache invalidation
3
+--EXTENSIONS--
4
+dom
5
+--FILE--
6
+<?php
7
+
8
+$dom = Dom\XMLDocument::createFromString('<root><a/><a/><a/></root>');
9
+$els = $dom->getElementsByTagName('a');
10
+var_dump($els[0]->tagName);
11
12
+$dom->documentElement->innerHTML = '<b/>';
13
14
+echo $dom->saveXML(), "\n";
15
+var_dump($els);
16
+var_dump($els[0]?->tagName);
17
18
+?>
19
+--EXPECT--
20
+string(1) "a"
21
+<?xml version="1.0" encoding="UTF-8"?>
22
+<root><b/></root>
23
+object(Dom\HTMLCollection)#2 (1) {
24
+ ["length"]=>
25
+ int(0)
26
+}
27
0 commit comments