public class Student{ public function speek($name){ echo 'my name is '.$name; } } $method='speek'; $stu_model=new Student(); $stu_model->$stu_model('matt');
其中$method为自己定义的变量