xref: /PHP-8.3/ext/dom/tests/bug70001.phpt (revision bd9f4fa6)
1--TEST--
2Bug #70001 (Assigning to DOMNode::textContent does additional entity encoding)
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7$element = new DOMText('<p>foo & bar</p>');
8var_dump($element->textContent);
9$element = (new DOMDocument())->createTextNode('<p>foo & bar</p>');
10var_dump($element->textContent);
11$element->textContent = ('<p>foo & bar</p>');
12var_dump($element->textContent);
13?>
14--EXPECT--
15string(16) "<p>foo & bar</p>"
16string(16) "<p>foo & bar</p>"
17string(16) "<p>foo & bar</p>"
18