1--TEST-- 2Bug #79701 (getElementById does not correctly work with duplicate definitions) - attribute node variation 3--EXTENSIONS-- 4dom 5--FILE-- 6<?php 7$dom = Dom\HTMLDocument::createEmpty(); 8$element = $dom->createElement('foo'); 9$dom->append($element); 10$attr = $dom->createAttribute('id'); 11$attr->value = 'test'; 12var_dump($dom->getElementById('test')?->nodeName); 13$element->setAttributeNode($attr); 14var_dump($dom->getElementById('test')?->nodeName); 15?> 16--EXPECT-- 17NULL 18string(3) "FOO" 19