In PHP5, what is the difference between using self and $this? When is each appropriate?
2012-05-23 10:22 dreamhappy 阅读(266) 评论(0) 编辑 收藏 举报
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.