|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74434 private methods from super classes' traits are listed in reflectionclass
Submitted: 2017-04-13 15:05 UTC Modified: 2017-04-13 18:18 UTC
From: nontelado at example dot org Assigned:
Status: Not a bug Package: Reflection related
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
36 + 10 = ?
Subscribe to this entry?

 [2017-04-13 15:05 UTC] nontelado at example dot org

Test script:
trait TTT{
    private function baz(){}

class AAA{
    use TTT;

class BBB extends AAA{}

$RC = new ReflectionClass(BBB::CLASS);
// lists TTT::baz


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-13 18:18 UTC]
-Status: Open +Status: Not a bug
 [2017-04-13 18:18 UTC]
Reflection will show inaccessible members. That's the nature of reflection.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Dec 06 04:01:27 2023 UTC