|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-09-11 18:11 UTC] felipe@php.net
-Status: Open
+Status: Assigned
-Assigned To:
+Assigned To: rrichards
[2010-09-11 18:11 UTC] felipe@php.net
[2010-09-11 19:02 UTC] felipe@php.net
[2015-05-22 02:40 UTC] cmb@php.net
-Status: Assigned
+Status: Not a bug
-Assigned To: rrichards
+Assigned To: cmb
[2015-05-22 02:40 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 07:00:02 2025 UTC |
Description: ------------ the result of test script below is different between php version 5.1.6 and version 5.3.2. Test script: --------------- <?php var_dump(phpversion()); $foo1 = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8"?><root />'); $foo1->addChild("x", htmlspecialchars("<test />")); $foo2 = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8"?><root><x /></root>'); $foo2->x = htmlspecialchars("<test />"); var_dump($foo1->x); var_dump($foo2->x); var_dump($foo1->asXML() === $foo2->asXML()); ?> Expected result: ---------------- string(5) "5.1.6" object(SimpleXMLElement)#3 (1) { [0]=> string(8) "<test />" } object(SimpleXMLElement)#3 (1) { [0]=> string(8) "<test />" } bool(true) Actual result: -------------- string(5) "5.3.2" object(SimpleXMLElement)#3 (1) { [0]=> string(8) "<test />" } object(SimpleXMLElement)#3 (1) { [0]=> string(14) "<test />" } bool(false)