PHP动态函数处理

public class Student{

  public function speek($name){
     echo 'my name is '.$name;
  }  

}


$method='speek';
$stu_model=new Student();
$stu_model->$stu_model('matt');

 其中$method为自己定义的变量

 

posted on 2017-11-04 18:15  马文柱  阅读(336)  评论(0编辑  收藏  举报