|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-05-26 00:53 UTC] felipe@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 20:00:01 2025 UTC |
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 ) )