From:             php at adamashley dot name
Operating system: Ubuntu 9.04
PHP version:      5.2.9
PHP Bug Type:     Reflection related
Bug description:  Reflection API does not see parameter list for __get()

Description:
------------
The Reflection API does not return details of the parameter list for
__get()

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

class testReflect
{
    function get( $name )
    {
        return $name;
    }

    function __get( $name )
    {
        switch( $name )
        {
            case 'one':
                return 1;

            case 'two':
                return 2;
        }
    }
}

$class = new ReflectionClass('testReflect');
$method = $class->getMethod('__get');
$parameters = $method->getParameters();

print "testReflect::__get()\n";
print_r($prarmeters);

$method = $class->getMethod('get');
$parameters = $method->getParameters();

print "testReflect::get()\n";
print_r($parameters);

?>

Expected result:
----------------
testReflect::__get()
Array
(
    [0] => ReflectionParameter Object
        (
            [name] => name
        )

)
testReflect::get()
Array
(
    [0] => ReflectionParameter Object
        (
            [name] => name
        )

)


Actual result:
--------------
testReflect::__get()
testReflect::get()
Array
(
    [0] => ReflectionParameter Object
        (
            [name] => name
        )

)


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

Reply via email to