|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-07-16 12:43 UTC] rrichards@php.net
[2006-01-10 01:32 UTC] nforbes@php.net
[2012-04-15 14:37 UTC] hanskrentel at yahoo dot de
[2012-10-11 12:49 UTC] kjarli at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 06 17:00:01 2025 UTC |
Description: ------------ The following code: $d = DOMDocument::loadXML("<some><xml><here></here></xml></some>"); works perfectly well, but when setting PHP to report E_STRICT warnings: error_reporting(E_ALL|E_STRICT); It says: Strict Standards: Non-static method DOMDocument::loadXML() should not be called statically in [some script] on line [some line] which I think is incorrect, since DOMDocument::loadXML is (even according to the manual, http://nl2.php.net/manual/en/function.dom-domdocument-loadxml.php) a static function. Reproduce code: --------------- <?php error_reporting(E_ALL|E_STRICT); $d = DOMDocument::loadXML("<some><xml><here></here></xml></some>"); ?> Expected result: ---------------- No error, this code is (in my eyes) perfectly valid. Actual result: -------------- Strict Standards: Non-static method DOMDocument::loadXML() should not be called statically in [some script] on line [some line]