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
 [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: Sat May 18 12:01:32 2024 UTC