mirror of
https://github.com/php/php-src.git
synced 2024-11-28 12:26:37 +08:00
d515455589
Just changing the error level of the message from E_STRICT to E_DEPRECATED. This comes one version later than the timeline mentioned in the RFC. Oddly, there were no tests for this ‘feature’. I added a simple one.
21 lines
397 B
PHP
21 lines
397 B
PHP
--TEST--
|
|
Incompatible context call (non-internal function)
|
|
--INI--
|
|
error_reporting=E_ALL
|
|
--FILE--
|
|
<?php
|
|
|
|
class A {
|
|
function foo() { var_dump(get_class($this)); }
|
|
}
|
|
class B {
|
|
function bar() { A::foo(); }
|
|
}
|
|
$b = new B;
|
|
$b->bar();
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Deprecated: Non-static method A::foo() should not be called statically, assuming $this from incompatible context in %s on line %d
|
|
string(1) "B"
|