Doc #68540 [NEW]: Documenattion about checking SimpleXML needs clarification
| From: | seo at gacek dot vot dot pl | Date: | Wed, 03 Dec 2014 10:47:57 +0000 |
| Subject: | Doc #68540 [NEW]: Documenattion about checking SimpleXML needs clarification | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-11718@lists.php.net to get a copy of this message | ||
From: seo at gacek dot vot dot pl
Operating system:
PHP version: Irrelevant
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:Documenattion about checking SimpleXML needs clarification
Description:
------------
---
From manual page: http://www.php.net/language.types.boolean
---
Documentation needs some more information, to clarify when simplexml
object is considered true.
More information here: http://stackoverflow.com/a/27157104/1430632
Tried adding it to documentation
<warning>
<simpara>
<literal>SimpleXML</literal> evaluates to &true; only if it has
child nodes or properties - only then object is not considered empty.
To check if <literal>SimpleXML</literal> object has &string; value
you have to cast it to &string;
</simpara>
</warning>
--
Edit bug report at https://bugs.php.net/bug.php?id=68540&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68540&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68540&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68540&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=68540&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=68540&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=68540&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=68540&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=68540&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=68540&r=support
Expected behavior: https://bugs.php.net/fix.php?id=68540&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=68540&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=68540&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=68540&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68540&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=68540&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=68540&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=68540&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=68540&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=68540&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=68540&r=mysqlcfg