mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
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.
27 lines
460 B
PHP
27 lines
460 B
PHP
--TEST--
|
|
Bug #41026 (segfault when calling "self::method()" in shutdown functions)
|
|
--FILE--
|
|
<?php
|
|
|
|
class try_class
|
|
{
|
|
static public function main ()
|
|
{
|
|
register_shutdown_function (array ("self", "on_shutdown"));
|
|
}
|
|
|
|
static public function on_shutdown ()
|
|
{
|
|
printf ("CHECKPOINT\n");
|
|
}
|
|
}
|
|
|
|
try_class::main ();
|
|
|
|
echo "Done\n";
|
|
?>
|
|
--EXPECTF--
|
|
Deprecated: Use of "self" in callables is deprecated in %s on line %d
|
|
Done
|
|
CHECKPOINT
|