1--TEST-- 2DOMDocument::getElementsByTagName() liveness with simplexml_import_dom 3--EXTENSIONS-- 4dom 5simplexml 6--FILE-- 7<?php 8 9$doc = new DOMDocument; 10$doc->loadXML( '<root><e i="1"/><e i="2"/><e i="3"/><e i="4"/><e i="5"/><e i="6"/><e i="7"/><e i="8"/><e i="9"/><e i="10"/></root>' ); 11$list = $doc->getElementsByTagName('e'); 12print $list->item(5)->getAttribute('i')."\n"; 13echo "before import\n"; 14$s = simplexml_import_dom($doc->documentElement); 15echo "after import\n"; 16 17unset($s->e[5]); 18print $list->item(5)->getAttribute('i')."\n"; 19 20unset($s->e[5]); 21print $list->item(5)->getAttribute('i')."\n"; 22 23?> 24--EXPECT-- 256 26before import 27after import 287 298 30