mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00

* Fix `#[\Deprecated]` for `__call()` and `__callStatic()` Fixes php/php-src#17597. * Do not duplicate the `attributes` table in `zend_get_call_trampoline_func()`
24 lines
461 B
PHP
24 lines
461 B
PHP
--TEST--
|
|
#[\Deprecated]: __call() and __callStatic()
|
|
--FILE--
|
|
<?php
|
|
|
|
class Clazz {
|
|
#[\Deprecated]
|
|
function __call(string $name, array $params) {
|
|
}
|
|
|
|
#[\Deprecated("due to some reason")]
|
|
static function __callStatic(string $name, array $params) {
|
|
}
|
|
}
|
|
|
|
$cls = new Clazz();
|
|
$cls->test();
|
|
Clazz::test2();
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Deprecated: Method Clazz::test() is deprecated in %s
|
|
|
|
Deprecated: Method Clazz::test2() is deprecated, due to some reason in %s on line %d
|