note 80180 added to function.simplexml-element-xpath
| From: | fake_id_911 at yahoo dot com | Date: | Thu, 03 Jan 2008 00:45:21 +0000 |
| Subject: | note 80180 added to function.simplexml-element-xpath | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-134673@lists.php.net to get a copy of this message | ||
$XML = new SimpleXMLElement("<nothing/>");
$xpath = "/a/b";
$testPath = $XML->xpath($xpath);
if(is_bool($testPath)){
print "it's a boolean!";
}
/*Xpath returns and array, and if the path is not there or there is no children, it will return an
empty array which is the same as false. FALSE in this case is an empty array, not a boolean!
*/
----
Server IP: 64.71.164.2
Probable Submitter: 209.219.239.2
----
Manual Page -- http://www.php.net/manual/en/function.simplexml-element-xpath.php
Edit -- https://master.php.net/note/edit/80180
Del: integrated -- https://master.php.net/note/delete/80180/integrated
Del: useless -- https://master.php.net/note/delete/80180/useless
Del: bad code -- https://master.php.net/note/delete/80180/bad+code
Del: spam -- https://master.php.net/note/delete/80180/spam
Del: non-english -- https://master.php.net/note/delete/80180/non-english
Del: in docs -- https://master.php.net/note/delete/80180/in+docs
Del: other reasons-- https://master.php.net/note/delete/80180
Reject -- https://master.php.net/note/reject/80180
Search -- https://master.php.net/manage/user-notes.php