简体   繁体   中英

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;
}

$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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM