note 74717 deleted from function.simplexml-load-string by cmb
| From: | cmb@php.net | Date: | Sun, 15 Dec 2019 10:08:09 +0000 |
| Subject: | note 74717 deleted from function.simplexml-load-string by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-213521@lists.php.net to get a copy of this message | ||
Note Submitter: php at teamhirsch dot com
----
It's worth noting that in the example above, $xml->body will actually return an object of
type SimpleXMLElement, not a string, e.g.
SimpleXMLElement Object (
[0] => this is the text in the body tag
)
If you want to get a string out of it you must explicitly cast it using (string) or double quotes,
or pass $xml->body (or whatever attribute you want to access) to any function that returns a
string, such as urldecode() or trim().