PIPIONE
1234567891011121314151617class Demo{ protected $param;//声明一个变量 function set_param(){ $this->param = 'demo';//指定值 return true; } function get_param(){ return $this->param;//获取值 }}$demo = new Demo;$demo->set_param();echo $demo->get_param();