扫二维码与项目经理沟通
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流
var test = function (){
this.str = '',
this.a = function (){
this.str += "a"
return this
},
this.b = function(){
this.str += "b"
return this
}
this.out = function(){
console.log(this.str)
}
}
var entity = new test()
entity.a().b().out()
ab
out .= $a;
return $this;
}
public function b($b){
$this->out .= $b;
return $this;
}
public function say(){
echo $this->out.PHP_EOL;
}
public function get(){
return $this->out;
}
}
$single = new single();
$out = $single->a('a')->b('b')->say();
$get = $single->a('a')->b('b')->get();
echo $get;
ab
abab
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流