Bug #74434 [Opn->Nab]: private methods from super classes' traits are listed in reflectionclass
| From: | requinix@php.net | Date: | Thu, 13 Apr 2017 18:18:39 +0000 |
| Subject: | Bug #74434 [Opn->Nab]: private methods from super classes' traits are listed in reflectionclass | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-208532@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74434&edit=1
ID: 74434
Updated by: requinix@php.net
Reported by: nontelado at example dot org
Summary: private methods from super classes' traits are
listed in reflectionclass
-Status: Open
+Status: Not a bug
Type: Bug
Package: Reflection related
Operating System: Irrelevant
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Reflection will show inaccessible members. That's the nature of reflection.
Previous Comments:
------------------------------------------------------------------------
[2017-04-13 15:05:14] nontelado at example dot org
Description:
------------
https://3v4l.org/sSUph
Test script:
---------------
trait TTT{
private function baz(){}
}
class AAA{
use TTT;
}
class BBB extends AAA{}
$RC = new ReflectionClass(BBB::CLASS);
var_dump($RC->getMethods(ReflectionMethod::IS_PRIVATE));
// lists TTT::baz
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74434&edit=1