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
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: 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

Add a Patch

Pull Requests

Add a Pull Request

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: Tue Jun 18 15:01:30 2024 UTC