unknown
unknown

Reputation: 31

what does $this-> mean?

What is the function of $this-> operator here? is it point that variable?

Can someone explain the code below:

if(isset($this->mDbPort))
{
  $this->mDbHost .= ":" . $this->mDbPort;
}

Upvotes: 2

Views: 84

Answers (1)

Dan Grossman
Dan Grossman

Reputation: 52382

$this-> refers to the object instance.

$this->mDbPort refers to the mDbPort property of the object this code is a part of.

PHP Manual :: Objects and Classes

Upvotes: 7

Related Questions