note 91524 added to intro.simplexml
| From: | simoncpu at gmail dot com | Date: | Mon, 15 Jun 2009 06:45:25 +0000 |
| Subject: | note 91524 added to intro.simplexml | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-156868@lists.php.net to get a copy of this message | ||
As of June PHP 5.2.9, SimpleXML behaves inconsistently with some (or most?) XML strings.
For instance, when you var_dump() a SimpleXML object that contains an array of SimpleXML objects
(i.e., $foobar->myarray), PHP prints the results correctly. When you var_dump()
$foobar->myarray, however, only the first element is displayed. But, when you loop through the
elements using foreach, you can see that all of the elements are there.
This inconsistent behavior is confusing. Welcome to PHP.
----
Server IP: 69.147.83.197
Probable Submitter: 58.71.34.137
----
Manual Page -- http://www.php.net/manual/en/intro.simplexml.php
Edit -- https://master.php.net/note/edit/91524
Del: integrated -- https://master.php.net/note/delete/91524/integrated
Del: useless -- https://master.php.net/note/delete/91524/useless
Del: bad code -- https://master.php.net/note/delete/91524/bad+code
Del: spam -- https://master.php.net/note/delete/91524/spam
Del: non-english -- https://master.php.net/note/delete/91524/non-english
Del: in docs -- https://master.php.net/note/delete/91524/in+docs
Del: other reasons-- https://master.php.net/note/delete/91524
Reject -- https://master.php.net/note/reject/91524
Search -- https://master.php.net/manage/user-notes.php