在此我不讲理论,用实例说话。
class Test{
public $arr=array('class'=>'Test');
public static function method(){
echo "this is a static method";
}
}
$T=new Test();
$varchar=$T->arr['class'];
var_dump($varchar::method());
输出结果:
this is a static method
null