Invokes the reflected method and pass its arguments as array.
<?phpclass getclass{
public function heloname($name) {
return 'Hi' . $name;
}
}
$reflectionMethod = new ReflectionMethod('getclass', 'heloname
');
echo $reflectionMethod->invokeArgs(new
getclass
(), array('Mike'));?>
No comments:
Post a Comment