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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: yagmikita at gmail dot com
New email:
PHP Version: OS:

 

 [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: Tue Apr 16 17:01:30 2024 UTC