Doc #60382 [Opn->Csd]: Documented return value for SimpleXML too generic
| From: | frozenfire@php.net | Date: | Sun, 27 Nov 2011 03:29:58 +0000 |
| Subject: | Doc #60382 [Opn->Csd]: Documented return value for SimpleXML too generic | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-7476@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60382&edit=1
ID: 60382
Updated by: frozenfire@php.net
Reported by: bfanger at gmail dot com
Summary: Documented return value for SimpleXML too generic
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
-Assigned To:
+Assigned To: frozenfire
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation better.
Previous Comments:
------------------------------------------------------------------------
[2011-11-27 03:29:44] frozenfire@php.net
Automatic comment from SVN on behalf of frozenfire
Revision: http://svn.php.net/viewvc/?view=revision&revision=319987
Log: Changed return type to SimpleXMLElement, for the purpose of simplification. Closes bug #60382.
Also changed returns to use proper 'or false on failure' entity.
------------------------------------------------------------------------
[2011-11-25 09:54:32] bfanger at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.simplexml-load-string#refsect1-
function.simplexml-load-string-description
---
The simplexml_load_file() and simplexml_load_string() functions are documented
to return a "object".
(Which prevents autocompletion in IDE's)
I propose to change the return value to SimpleXMLElement and the documentation
to:
"Returns an SimpleXMLElement (or the specified descendant) with properties
containing the data held within the xml document. On errors, it will return
FALSE."
or the shorter:
"Returns a SimpleXMLElement or FALSE on failure."
That's used at http://www.php.net/manual/en/function.simplexml-import-dom.php
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60382&edit=1