
PHP
柠檬A123
读书中,
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
this,self,parent的区别
1. this是指向当前对象的指针 this指向的是调用该函数的对象.(谁调用该函数,this就指的是谁). 2.self是指向当前类的指针 self指向的是本类对象.(与调用函数的对象无关). 3.parent是指向父类的指针 parent指的就是父类对象. ...原创 2020-06-04 07:25:00 · 393 阅读 · 0 评论 -
php中的new static和new self的区别
new static和new self的区别 例1 class Father { public function getSelf() { return new self(); } public function getStatic() { return new static(); } } $f = new Fa...原创 2020-03-14 17:32:41 · 329 阅读 · 1 评论