代码改变世界

随笔档案-2012年5月23日

In PHP5, what is the difference between using self and $this? When is each appropriate?

2012-05-23 10:22 by dreamhappy, 269 阅读, 收藏, 编辑
摘要: Use $this to refer to the current object. Use self to refer to the current class. In other words, use $this->member for non-static members, use self::$member for static members. 阅读全文
点击右上角即可分享
微信分享提示