mirror of
https://github.com/php/php-src.git
synced 2024-12-16 05:15:03 +08:00
ee510eed68
This deprecates all callables that are accepted by call_user_func($callable) but not by $callable(). In particular: "self::method" "parent::method" "static::method" ["self", "method"] ["parent", "method"] ["static", "method"] ["Foo", "Bar::method"] [new Foo, "Bar::method"] RFC: https://wiki.php.net/rfc/deprecate_partially_supported_callables Closes GH-7446.
25 lines
436 B
PHP
25 lines
436 B
PHP
--TEST--
|
|
ZE2 Late Static Binding call to static::method() from internal function (string)
|
|
--FILE--
|
|
<?php
|
|
|
|
class Test1 {
|
|
static function ok() {
|
|
echo "bug";
|
|
}
|
|
static function test() {
|
|
call_user_func("static::ok");
|
|
}
|
|
}
|
|
|
|
class Test2 extends Test1 {
|
|
static function ok() {
|
|
echo "ok";
|
|
}
|
|
}
|
|
Test2::test();
|
|
?>
|
|
--EXPECTF--
|
|
Deprecated: Use of "static" in callables is deprecated in %s on line %d
|
|
ok
|