xref: /PHP-8.2/ext/dom/tests/bug37456.phpt (revision bd9f4fa6)
1--TEST--
2Bug #37456 (DOMElement->setAttribute() loops forever)
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$doc = new DOMDocument();
9$doc->resolveExternals = true;
10$doc->load(__DIR__."/dom.xml");
11
12$root = $doc->getElementsByTagName('foo')->item(0);
13$root->setAttribute('bar', '&gt;');
14$attr = $root->setAttribute('bar', 'newval');
15print $attr->nodeValue;
16
17
18?>
19--EXPECT--
20newval
21