xref: /PHP-7.4/ext/simplexml/tests/bug75245.phpt (revision 6462c196)
1--TEST--
2Bug #75245 Don't set content of elements with only whitespaces
3--SKIPIF--
4<?php
5if (!extension_loaded('simplexml')) die('skip simplexml not available');
6?>
7--FILE--
8<?php
9var_dump(simplexml_load_string('<test1><test2>    </test2><test3></test3></test1>'));
10?>
11===DONE===
12--EXPECT--
13object(SimpleXMLElement)#1 (2) {
14  ["test2"]=>
15  object(SimpleXMLElement)#2 (0) {
16  }
17  ["test3"]=>
18  object(SimpleXMLElement)#3 (0) {
19  }
20}
21===DONE===
22