Hi,

I was looking at the documentation for DOMDocument::loadHTML() [1] that 
mentions the following:

> This function may also be called statically to load and create a DOMDocument 
> object. The static invocation may be used when no DOMDocument properties need 
> to be set prior to loading.

However, this can’t be done in strict mode [2]:

> Strict Standards: Non-static method DOMDocument::loadHTML() should not be 
> called statically in …

This behaviour seems to be intended when ZEND_ACC_ALLOW_STATIC is used [3] and 
can be fixed by using ZEND_ACC_STATIC instead.

My questions:

1) Is that the right kind of fix? 
2) Is ZEND_ACC_ALLOW_STATIC meant to be used only for BC? If not, why are we 
raising strict errors?


[1] http://php.net/manual/en/domdocument.loadhtml.php 
<http://php.net/manual/en/domdocument.loadhtml.php>
[2] http://3v4l.org/JC7p0#v500 <http://3v4l.org/JC7p0#v500>
[3] http://lxr.php.net/xref/PHP_5_5/Zend/zend_vm_def.h#1935 
<http://lxr.php.net/xref/PHP_5_5/Zend/zend_vm_def.h#1935>

Reply via email to