xref: /PHP-8.3/ext/simplexml/tests/bug75245.phpt (revision 7f2f0c00)
1--TEST--
2Bug #75245 Don't set content of elements with only whitespaces
3--EXTENSIONS--
4simplexml
5--FILE--
6<?php
7var_dump(simplexml_load_string('<test1><test2>    </test2><test3></test3></test1>'));
8?>
9--EXPECT--
10object(SimpleXMLElement)#1 (2) {
11  ["test2"]=>
12  object(SimpleXMLElement)#2 (0) {
13  }
14  ["test3"]=>
15  object(SimpleXMLElement)#3 (0) {
16  }
17}
18