2016-08-19 07:38发布
<?php class A { protected function pro() { return "pro"; } public function pub() { return "pub"; } } $a = new A(); $ext = function () { var_dump($this); // var_dump($this->pro()); //Error: Call to protected method A::pro() var_dump($this->pub()); }; $ext = $ext->bindTo($a); var_dump($ext());
最多设置5个标签!
一周热门 更多>