php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #44067 Implement hasChildren in SimpleXML
Submitted: 2008-02-07 04:29 UTC Modified: 2008-02-07 09:33 UTC
From: preinheimer@php.net Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 5.2.5 OS: N/A
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: preinheimer@php.net
New email:
PHP Version: OS:

 

 [2008-02-07 04:29 UTC] preinheimer@php.net
Description:
------------
SimpleXML provides the useful children() method to return the children of a given element, it returns E_WARNING if no children are present. As such, it would be useful to be able to ensure an element has children before attempting to retreive them.

can i has cheezburger? or just 
bool SimpleXMLElement->hasChidren()


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-02-07 09:33 UTC] helly@php.net
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php

Use SimpleXMLIterator :-)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC