From:             ivan1986 at list dot ru
Operating system: Linux Debian
PHP version:      5.2.8
PHP Bug Type:     Reflection related
Bug description:  Wrong Reflection for extends class

Description:
------------
I test this in two version:

i...@ivan1986:~% /usr/bin/php -v
PHP 5.2.6-3 with Suhosin-Patch 0.9.6.2 (cli) (built: Jan 25 2009
00:51:23)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
    with XCache v1.2.2, Copyright (c) 2005-2007, by mOo

i...@ivan1986:~% php -v
PHP 6.0.0-dev (cli) (built: Nov  8 2008 02:31:17)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v3.0.0-dev, Copyright (c) 1998-2008 Zend Technologies

in CVS error now.

Reproduce code:
---------------
<?php

class A
{
        protected function a() {}
        
}

class B extends A
{
        public function b() {}
}

$B = new B();
$R = new ReflectionObject($B);
$m = $R->getMethods();
print_r($m);

?>

Expected result:
----------------
Array
(
    [0] => ReflectionMethod Object
        (
            [name] => b
            [class] => B
        )

    [1] => ReflectionMethod Object
        (
            [name] => a
            [class] => A
        )

)


Actual result:
--------------
Array
(
    [0] => ReflectionMethod Object
        (
            [name] => b
            [class] => B
        )

    [1] => ReflectionMethod Object
        (
            [name] => a
            [class] => B
        )

)


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

Reply via email to