xref: /PHP-8.0/ext/dom/tests/bug37456.phpt (revision 26dfce7f)
1--TEST--
2Bug #37456 (DOMElement->setAttribute() loops forever)
3--SKIPIF--
4<?php require_once('skipif.inc'); ?>
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