From:             lavin dot peter at gmail dot com
Operating system: Windows XP
PHP version:      5.1.4
PHP Bug Type:     PHP options/info functions
Bug description:  Reflection shows private methods of parent class

Description:
------------
When using the export method of ReflectionClass the private methods of of
a parent class are displayed.

Reproduce code:
---------------
class Base{
  private $basevar;
  private function baseFunction(){}
}
class Derived extends Base{}
$d = new Derived;
Reflection::export(new ReflectionClass($d));



Expected result:
----------------
Since properties and methods defined as private are not inherited, the
exported Base class should have no properties or methods but in fact the
private method of the Parent class shows up.

Actual result:
--------------
Class [ class Derived extends Base ] { @@ C:\Program Files\Apache
Group\Apache2\htdocs\newstuff\captcha\refbug.php 6-6 - Constants [0] { } -
Static properties [0] { } - Static methods [0] { } - Properties [0] { } -
Methods [1] { Method [ private method baseFunction ] { @@ C:\Program
Files\Apache Group\Apache2\htdocs\newstuff\captcha\refbug.php 4 - 4 } } } 

-- 
Edit bug report at http://bugs.php.net/?id=37964&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=37964&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=37964&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=37964&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=37964&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=37964&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=37964&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=37964&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=37964&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=37964&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=37964&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=37964&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=37964&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=37964&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=37964&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=37964&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=37964&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=37964&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=37964&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=37964&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=37964&r=mysqlcfg

Reply via email to