References an object.
This operator is used to reference methods and properties in objects.
class MyClass
{
var $s = "Hello World";
function getProperty() {
return $this->s;
}
}
$myObject = new MyClass;
print $myObject->getProperty() . "<br>";
print $myObject->s;
?> Hello World
Hello WorldAn object of a class is instantiated and referenced.