Recent Posts

Showing posts with label $self. Show all posts
Showing posts with label $self. Show all posts

PHP 5: When to use $self or $this

From http://www.phpbuilder.com/board/showthread.php?t=10354489:

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.