PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
it's used inside objects, it is a reference to the current instance of the object.. it's used to access other information in the object, normally instance sensitive.. such as variables set during operation of the object that vary between creations..
$this is the current instance of a class. $this->var allows you to set or read attributes of the instance. $this->method() allows you to run methods of the class.
This is a thinly related subject, but are self::method() and $this->method(); the same, with the exception of the SRO being a static call? Or would self::method() be the same as calling className::method() from outside of the class?