标签:
class classname{
public $attribute;
function operation($param){
$this->attribute = $param;
echo $this->attribute;
}
}
class classname{
public $attribute;
}
$a = new classname();
$a->attribute = "value";
echo $a->attribute;
class classname{
public $attribute;
function __get($name){
return $this->attribute;
}
function __set($name, $value){
$this->$name = $value;
}
}
标签:
原文地址:http://www.cnblogs.com/mvpchenjian/p/4836921.html