|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34127 Problems in SimpleXML object
Submitted: 2005-08-14 14:30 UTC Modified: 2005-08-14 15:09 UTC
From: alesegala at users dot sourceforge dot net Assigned:
Status: Not a bug Package: SimpleXML related
PHP Version: 5.* OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: alesegala at users dot sourceforge dot net
New email:
PHP Version: OS:


 [2005-08-14 14:30 UTC] alesegala at users dot sourceforge dot net
I parsed an XML file with SimpleXML (I used simplexml_load_file()) and I stored it into $xml.
You can view the object (printed using var_dump()) here:
I needed to copy the array "album" (only that array) into $album, so I did $album = $xml->album; .
At this point $album didn't contain all the array, but only the first element:
object(SimpleXMLElement)#3 (4) {
  string(1) "2"
  string(1) "3"
  string(13) "Test subalbum"
  object(SimpleXMLElement)#5 (0) {

I'm using Windows XP Pro SP2, Apache 2.0.53, PHP 5.0.4, SimpleXML (I took the dll from the archive pecl-5.0.4).


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-14 15:09 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

SimpleXMLObjects are iterators not legacy php arrays.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jul 16 12:01:28 2024 UTC