--TEST--
Fix GH-11682 (Consecutive calls to DOMNode::before and DOMNode::remove unlink wrong nodes)
--EXTENSIONS--
dom
--FILE--
loadXML('');
$list = [
$dom->createElement('foo1'),
$dom->createElement('foo2'),
$dom->createElement('foo3')
];
$node = $dom->getElementsByTagName('node')->item(0);
$node->before(...$list);
$node->remove();
echo $dom->saveXML();
?>
--EXPECT--