note 96416 added to simplexml.examples-errors

From: Date: Fri, 26 Feb 2010 04:20:17 +0000
Subject: note 96416 added to simplexml.examples-errors
Groups: php.notes 
Request: Send a blank email to php-notes+get-166385@lists.php.net to get a copy of this message
Note that "if (! $sxe) {" may give you a false-negative if the XML document was empty (e.g. "<root />"). In that case, $sxe will be: object(SimpleXMLElement)#1 (0) { } which will evaluate to false, even though nothing technically went wrong. Consider instead: "if ($sxe === false) {" ---- Server IP: 69.147.83.197 Probable Submitter: 99.131.48.44 ---- Manual Page -- http://www.php.net/manual/en/simplexml.examples-errors.php Edit -- https://master.php.net/note/edit/96416 Del: integrated -- https://master.php.net/note/delete/96416/integrated Del: useless -- https://master.php.net/note/delete/96416/useless Del: bad code -- https://master.php.net/note/delete/96416/bad+code Del: spam -- https://master.php.net/note/delete/96416/spam Del: non-english -- https://master.php.net/note/delete/96416/non-english Del: in docs -- https://master.php.net/note/delete/96416/in+docs Del: other reasons-- https://master.php.net/note/delete/96416 Reject -- https://master.php.net/note/reject/96416 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#166385) next »