Taken from http://mypaaji.com/Index.php/php-quick-reference/
$this-> var2 = $value;
}
// private method
private function bar() {
// more code goes here
}
// destructor method
public function __destruct() {
// clean up code goes here
}
}
$c = new ClassName(); // create a new instance of the object
$c-> var1 = 42; // properties and methods are accessed using - >
$c-> setFoo('Hello World');
?>