锟斤拷锟斤拷锟斤拷氪达拷锟斤拷诮锟斤拷锟斤拷专锟脚版本锟斤拷锟斤拷锟斤拷说锟斤拷锟节达拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷 HTML 时锟斤拷锟斤拷锟斤拷锟节凤拷锟绞的筹拷员锟斤拷锟斤拷锟斤拷取锟斤拷锟斤拷锟斤拷锟斤拷使锟斤拷实锟矫的凤拷锟斤拷锟斤拷锟斤拷 锟斤拷锟斤拷约锟斤拷锟斤拷锟斤拷锟秸癸拷锟斤拷恰锟�
Example #1 锟斤拷展锟斤拷锟矫碉拷锟斤拷
<?php
/**
* My Reflection_Method class
*/
class My_Reflection_Method extends ReflectionMethod
{
public $visibility = array();
public function __construct($o, $m)
{
parent::__construct($o, $m);
$this->visibility = Reflection::getModifierNames($this->getModifiers());
}
}
/**
* Demo class #1
*
*/
class T {
protected function x() {}
}
/**
* Demo class #2
*
*/
class U extends T {
function x() {}
}
// 锟斤拷锟斤拷锟较�
var_dump(new My_Reflection_Method('U', 'x'));
?>
锟斤拷锟斤拷锟斤拷锟教碉拷锟斤拷锟斤拷锟斤拷锟斤拷冢锟�
object(My_Reflection_Method)#1 (3) { ["visibility"]=> array(1) { [0]=> string(6) "public" } ["name"]=> string(1) "x" ["class"]=> string(1) "U" }
锟斤拷锟斤拷锟斤拷锟叫达拷斯锟斤拷旌拷锟斤拷锟斤拷锟阶★拷锟叫达拷魏尾锟斤拷锟侥达拷锟斤拷之前要锟饺碉拷锟矫革拷锟斤拷墓锟斤拷旌拷锟斤拷锟� 锟斤拷锟斤拷么锟斤拷锟斤拷锟结导锟斤拷锟斤拷锟铰的斤拷锟斤拷锟� Fatal error: Internal error: Failed to retrieve the reflection object