note 91524 deleted from intro.simplexml by danbrown
| From: | danbrown@php.net | Date: | Mon, 15 Jun 2009 12:28:58 +0000 |
| Subject: | note 91524 deleted from intro.simplexml by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-156885@lists.php.net to get a copy of this message | ||
Note Submitter: simoncpu at gmail dot com
----
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.