Bug #71526 [Opn]: SimpleXML different results with whitespace

From: Date: Sun, 17 Jul 2016 18:02:13 +0000
Subject: Bug #71526 [Opn]: SimpleXML different results with whitespace
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-202378@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71526&edit=1 ID: 71526 Updated by: cmb@php.net Reported by: jacob dot mroz at gmail dot com Summary: SimpleXML different results with whitespace Status: Open Type: Bug Package: SimpleXML related Operating System: CentOS release 6.7 (Final) PHP Version: 5.5.32 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: Appears to have been fixed in the meantime: <https://3v4l.org/t2uWt> and <https://3v4l.org/EkA3UB>. Might be related to bug #70905. Previous Comments: ------------------------------------------------------------------------ [2016-02-04 22:14:45] jacob dot mroz at gmail dot com Description: ------------ Adding spaces changes the internal representation of a SimpleXMLElement. If you change the value of c to add a space, '\n', or an additional node <x2/> after the node <x/>, you get the correct output. Test script: --------------- <?php var_dump(simplexml_load_string('<a><b/><c><x/></c></a>')->c); ?> Expected result: ---------------- class SimpleXMLElement#2 (1) { public $x => class SimpleXMLElement#3 (0) { } } Actual result: -------------- class SimpleXMLElement#2 (1) { public ${0} => class SimpleXMLElement#3 (1) { public $x => class SimpleXMLElement#4 (0) { } } } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=71526&edit=1

« previous php.bugs (#202378) next »