Piotr Klaban wrote:
Hi,
An example script:
<?php
error_reporting(4095);
class Foo {
function test() {
}
}
Foo::test();
?>
would produce in PHP5 error:
PHP Strict Standards: Non-static method Foo::test() should not be called statically in ... line 8
I have two questions:
1. Could it be possible that under specific circumstances such a call
can produce fatal error "Non-static method Foo::test() cannot be called statically"?
no
2. Is there a proper way to write such a class that would work properly in both
PHP4 and PHP5, without Strict errors?
no, unless you keep this code and turn off E_STRICT error_reporting
Best regards,
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php