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: -
From: yagmikita at gmail dot com Assigned:
Status: Open Package: SimpleXML related
PHP Version: 5.5.3 OS: ubuntu 13.04
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.
(description)
Block user comment
Status: Assign to:
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

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri May 24 03:01:26 2019 UTC