/ 对象链的使用操作
class Xiao{
public $name;
public $sex;
function __construct($name,$sex){
$this->name=$name;
$this->sex=$sex;
}
function say(){
echo "我的名字叫{$this->name}<br/>";
return $this;
}
function sex(){
echo "我的性别是{$this->sex}<br/>";
}
}
$jun=new Xiao('小明','20');
$jun->say()->sex();