|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patchesbug64592.patch (last revision 2013-04-06 13:19 UTC by laruence@php.net)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-04-06 02:08 UTC] laruence@php.net
[2013-04-06 11:54 UTC] benjamin dot morel at gmail dot com
[2013-04-06 13:19 UTC] laruence@php.net
[2013-04-06 15:11 UTC] benjamin dot morel at gmail dot com
[2013-04-06 15:27 UTC] felipe@php.net
-Status: Open
+Status: Not a bug
[2013-04-06 15:27 UTC] felipe@php.net
[2013-04-06 16:25 UTC] benjamin dot morel at gmail dot com
[2013-04-06 16:46 UTC] felipe@php.net
-Status: Not a bug
+Status: Open
[2013-04-07 12:53 UTC] felipe@php.net
-Status: Open
+Status: Assigned
-Assigned To:
+Assigned To: johannes
[2013-04-07 12:53 UTC] felipe@php.net
[2013-04-08 08:04 UTC] johannes@php.net
-Status: Assigned
+Status: Open
[2013-04-08 08:04 UTC] johannes@php.net
[2013-04-08 08:08 UTC] johannes@php.net
-Status: Assigned
+Status: Open
-Assigned To: johannes
+Assigned To:
[2013-04-08 08:54 UTC] benjamin dot morel at gmail dot com
[2016-06-29 15:13 UTC] cmb@php.net
[2016-06-29 15:17 UTC] benjamin dot morel at gmail dot com
[2020-02-28 14:54 UTC] nikic@php.net
[2020-02-28 14:54 UTC] nikic@php.net
-Status: Open
+Status: Closed
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 03:00:02 2025 UTC |
Description: ------------ As far as I understand it, ReflectionClass::getMethods() should return only the methods that are in the scope of the reflected class, thus excluding private methods from parent classes. That's moreover the behaviour exposed by ReflectionClass::getProperties(), making the two methods behave in different manners. Test script: --------------- class Foo { private $a; private function a() {} protected $b; protected function b() {} } class Bar extends Foo { private $c; private function c() {} } $r = new ReflectionClass('Bar'); echo 'Properties in scope: '; foreach ($r->getProperties() as $property) { echo $property->getName() . ' '; } echo PHP_EOL, 'Methods in scope: '; foreach ($r->getMethods() as $method) { echo $method->getName() . ' '; } Expected result: ---------------- Properties in scope: c b Methods in scope: c b Actual result: -------------- Properties in scope: c b Methods in scope: c a b