note 114696 added to simplexmlelement.tostring
| From: | sabev dot borislav at gmail dot com | Date: | Mon, 24 Mar 2014 13:51:41 +0000 |
| Subject: | note 114696 added to simplexmlelement.tostring | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-199037@lists.php.net to get a copy of this message | ||
This is an internal method that one cannot call. However all that one needs to do is to Typecast the
SimpleXMLElement to a string and it will call it internaly:
<?php
$xml = simple_xml_load_string('<items><item><title>This is title
1</title></item></items>');
$foo = (string) $xml->items->item->title;
?>
The documentation DOES NOT mention this.
----
Server IP: 89.190.194.18
Probable Submitter: 93.152.157.248
----
Manual Page -- http://php.net/manual/en/simplexmlelement.tostring.php
Edit -- https://master.php.net/note/edit/114696
Del: integrated -- https://master.php.net/note/delete/114696/integrated
Del: useless -- https://master.php.net/note/delete/114696/useless
Del: bad code -- https://master.php.net/note/delete/114696/bad+code
Del: spam -- https://master.php.net/note/delete/114696/spam
Del: non-english -- https://master.php.net/note/delete/114696/non-english
Del: in docs -- https://master.php.net/note/delete/114696/in+docs
Del: other reasons-- https://master.php.net/note/delete/114696
Reject -- https://master.php.net/note/reject/114696
Search -- https://master.php.net/manage/user-notes.php