Bug #71526 [Asn->Dup]: SimpleXML different results with whitespace
| From: | cmb@php.net | Date: | Sun, 27 Nov 2016 14:18:55 +0000 |
| Subject: | Bug #71526 [Asn->Dup]: SimpleXML different results with whitespace | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-205660@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: Assigned
+Status: Duplicate
Type: Bug
Package: SimpleXML related
Operating System: CentOS release 6.7 (Final)
PHP Version: 5.5.32
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
The misbehavior had been introduced with commit 5683b6fa[1] (PHP
5.5.27 and 5.6.11), and has been fixed with commit 8ca02bb2[2]
(PHP 5.6.20).
This ticket is actually a duplicate of bug #66084.
[1] <http://git.php.net/?p=php-src.git;a=commit;h=5683b6fa>
[2] <http://git.php.net/?p=php-src.git;a=commit;h=8ca02bb2>
Previous Comments:
------------------------------------------------------------------------
[2016-07-17 18:02:12] cmb@php.net
Appears to have been fixed in the meantime: <https://3v4l.org/t2uWt> and <https://3v4l.org/EkA3UB>.
Might be related to bug #70905.
------------------------------------------------------------------------
[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