Edit report at https://bugs.php.net/bug.php?id=63060&edit=1
ID: 63060 Comment by: reeze dot xia at gmail dot com Reported by: maglor at i dot ua Summary: Option LIBXML_NOEMPTYTAG is ignored Status: Open Type: Bug Package: SimpleXML related Operating System: Windows XP SP3 PHP Version: 5.3.16 Block user comment: N Private report: N New Comment: Hi maglor, http://php.net/manual/en/libxml.constants.php LIBXML_NOEMPTYTAG (integer) Expand empty tags (e.g. <br/> to <br></br>) Note: This option is currently just available in the DOMDocument::save and DOMDocument::saveXML functions. Previous Comments: ------------------------------------------------------------------------ [2012-09-11 09:36:02] maglor at i dot ua Description: ------------ Option LIBXML_NOEMPTYTAG is ignored for SimpleXMLElement::__construct() and simplexml_load_string() Probably, for simplexml_load_file() also. Test script: --------------- <?php $xml = new SimpleXMLElement('<?xml version="1.0" encoding="utf-8"?><request><packet></packet></request>', LIBXML_NOEMPTYTAG); $xml->saveXML(); Expected result: ---------------- <?xml version="1.0" encoding="utf-8"?> <request><packet></packet></request> Actual result: -------------- <?xml version="1.0" encoding="utf-8"?> <request><packet/></request> ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=63060&edit=1