note 57284 added to function.dom-domdocument-loadxml

From: Date: Thu, 29 Sep 2005 13:21:31 +0000
Subject: note 57284 added to function.dom-domdocument-loadxml
Groups: php.notes 
Request: Send a blank email to php-notes+get-95972@lists.php.net to get a copy of this message
Notice that there is a documentation bug there: <?php error_reporting(E_STRICT); $doc = DOMDocument::loadXML("<root>me?</root>"); print $doc->saveXML(); ?> Will return the following: <b>Strict Standards</b>: Non-static method DOMDocument::loadXML() should not be called statically in <b>PHPDocument6</b> on line <b>3</b><br /> But if you are using E_ALL, you don't get any notice. Although, you could use <?php $doc = new DOMDocument()->loadXML("<root>me?</root>"); ?> and avoid all the problems ;-) My Two Cents. ---- Manual Page -- http://www.php.net/manual/en/function.dom-domdocument-loadxml.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+57284 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+57284&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+57284&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+57284&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+57284&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+57284&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+57284&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+57284&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+57284&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#95972) next »