|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41867 getName is broken
Submitted: 2007-07-01 22:37 UTC Modified: 2007-07-02 11:38 UTC
Avg. Score:4.0 ± 0.8
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: moshe at varien dot com Assigned:
Status: Closed Package: SimpleXML related
PHP Version: 5.2.3 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
48 - 13 = ?
Subscribe to this entry?

 [2007-07-01 22:37 UTC] moshe at varien dot com
getName() returns name of the parent node instead of supplied one

Reproduce code:
$a = new SimplexmlElement("<a><b><c/></b></a>"); 
echo $a->b->c->getName();

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-07-01 23:10 UTC] moshe at varien dot com
Found a workaround:

$a = new SimplexmlElement("<a><b><c/></b></a>"); 
echo $a->b->c->c->getName();

 [2007-07-02 11:38 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Aug 03 20:01:24 2020 UTC