|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-11-23 01:54 UTC] aharvey@php.net
-Status: Open
+Status: Not a bug
[2012-11-23 01:54 UTC] aharvey@php.net
[2012-11-24 14:56 UTC] anthon dot pang at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 18:00:01 2025 UTC |
Description: ------------ getProperties() doesn't include "private" scoped properties from parent classes Test script: --------------- <?php abstract class Foo { public $a; protected $b; private $c; } class Bar extends Foo { public $d; protected $e; private $f; } $obj = new Bar; $reflection = new ReflectionClass($obj); $propertyList = $reflection->getProperties(); foreach ($propertyList as $property) { var_dump($property->getName()); } Expected result: ---------------- string(1) "d" string(1) "e" string(1) "f" string(1) "a" string(1) "b" string(1) "c" Actual result: -------------- string(1) "d" string(1) "e" string(1) "f" string(1) "a" string(1) "b"