mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +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
472 B
PHP
25 lines
472 B
PHP
--TEST--
|
|
Bug #78770: Incorrect callability check inside internal methods
|
|
--EXTENSIONS--
|
|
intl
|
|
--FILE--
|
|
<?php
|
|
|
|
class Test {
|
|
public function method() {
|
|
IntlChar::enumCharTypes([$this, 'privateMethod']);
|
|
IntlChar::enumCharTypes('self::privateMethod');
|
|
}
|
|
|
|
private function privateMethod($start, $end, $name) {
|
|
}
|
|
}
|
|
|
|
(new Test)->method();
|
|
|
|
?>
|
|
===DONE===
|
|
--EXPECTF--
|
|
Deprecated: Use of "self" in callables is deprecated in %s on line %d
|
|
===DONE===
|