|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-04-09 04:35 UTC] rasmus@php.net
[2010-04-09 09:13 UTC] zhangxc83 at sohu dot com
-Status: Open
+Status: Closed
[2010-04-09 09:13 UTC] zhangxc83 at sohu dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 11:00:02 2025 UTC |
Description: ------------ AS Test Scripts below: Test script: --------------- $xml = <<<EOT <?xml version="1.0" encoding="UTF-8"?> <root> <report id="testid">test value</report> </root> EOT; $xml = new \SimpleXMLElement(trim($xml)); print_r($xml); Expected result: ---------------- .SimpleXMLElement Object ( [report] => .SimpleXMLElement Object ( [@attributes] => Array ( [id] => testid ) [0] => test value ) ) Actual result: -------------- .SimpleXMLElement Object ( [report] => test value )