[php-src] Issue #8957: Invalid behavior of `ReflectionMethod`

From: Date: Fri, 08 Jul 2022 16:31:35 +0000
Subject: [php-src] Issue #8957: Invalid behavior of `ReflectionMethod`
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-241885@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/8957 Author: WinterSilence ### Description The following code: ```php <?php trait T { public function m() { return __METHOD__; } } class C { use T { T::m as tm; } public function m() { return __METHOD__; } } $method = new ReflectionMethod(C::class, 'mt'); var_dump($method->class, $method->name); ``` Resulted in this output: ``` string(1) "C" string(1) "m" ``` But I expected this output instead: ``` string(1) "C" string(2) "mt" ``` or ``` string(1) "T" string(1) "m" ``` ### PHP Version 7.4 ### Operating System any

« previous php.bugs (#241885) next »