PHP中new self()和new static()的区别探究

https://www.cnblogs.com/shizqiang/p/6277091.html

new self()返回的实例是万年不变的,无论谁去调用,都返回同一个类的实例,而new static()则是由调用者决定的。

posted @ 2018-05-08 15:33  姗姗醉了  阅读(146)  评论(0编辑  收藏  举报