ID:               39057
 Updated by:       [EMAIL PROTECTED]
 Reported By:      nickj-phpbugs at nickj dot org
-Status:           Open
+Status:           Bogus
 Bug Type:         Documentation problem
 Operating System: Ubuntu Linux
 PHP Version:      5CVS-2006-10-06 (snap)
 New Comment:

The method _can_ be called statically, but it shouldn't.
Most internal object methods cannot be called statically.


Previous Comments:
------------------------------------------------------------------------

[2006-10-06 08:17:51] nickj-phpbugs at nickj dot org

Description:
------------
>From http://php.net/manual/en/function.dom-domdocument-load.php : "This
method may also be called statically to load and create a DOMDocument
object." There is also a code example. Running the static example code
with E_ALL | E_STRICT error_reporting generates a warning.

Reproduce code:
---------------
echo "<blah/>" > file.xml
php5.2-200610042230/sapi/cli/php  -r 'error_reporting(E_ALL |
E_STRICT); $doc = DOMDocument::load("file.xml");'

Expected result:
----------------
No error.

Actual result:
--------------
PHP Strict Standards:  Non-static method DOMDocument::load() should not
be called statically in Command line code on line 1



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=39057&edit=1

Reply via email to