How to use "this" keyword in PHP?

Daniel

New member
I'm confused with this code:

public function __construct($name, $message = ' ') {
$this->name = $name;
$this->message = $message;
}

I know this keyword refer to the object itsself, but what happens if I don't use "this" keyword and when should I use this keyword?
 
Back
Top