php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65592 Wrong dumping behavior of an object
Submitted: 2013-08-30 11:45 UTC Modified: 2020-03-07 10:24 UTC
From: yagmikita at gmail dot com Assigned: cmb (profile)
Status: Duplicate Package: SimpleXML related
PHP Version: 5.5.3 OS: ubuntu 13.04
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:
MUST BE VALID
Solve the problem:
30 + 22 = ?
Subscribe to this entry?

 
 [2013-08-30 11:45 UTC] yagmikita at gmail dot com
Description:
------------
http://3v4l.org/53tYG#v5414

If not selected specially, some twin child node shows no attributes when dumping 
the content of the object. This behavior could lead to wrong conclusions when one  
analyzes the visual structure of the xml.

Test script:
---------------
<?php
$xml = new SimpleXMLElement('<root><elements attr="test"><el>test1</el><el>test2</el><el test_attr="123">test3</el></elements></root>');
var_dump(
	$xml,
	$xml->elements->el[2]
);

Expected result:
----------------
I expect to observe twin child node's attributes when dumping the object


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-03-07 10:24 UTC] cmb@php.net
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2020-03-07 10:24 UTC] cmb@php.net
This is a duplicate of bug #61597.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jul 27 00:01:30 2024 UTC