Page 1 of 1

What do the -> symbols do?

Posted: Sat Jan 14, 2012 1:27 pm
by itsmarkk
I am very new to PHP programming. In the following code snippet from a smtp.php file, what does the " -> " do? Does is have a functional meaning? Or is it just part of a variable name?

if(!isset($this->status)){
$obj = new smtp($params);
if($obj->connect()){
$obj->status = SMTP_STATUS_CONNECTED;
}


Thanks in advanced!

Re: What do the -> symbols do?

Posted: Sat Jan 14, 2012 1:43 pm
by Celauran
They allow you to access an object's properties and methods.

Re: What do the -> symbols do?

Posted: Sat Jan 14, 2012 1:58 pm
by Eric!
Perhaps a tutorial with some videos might help? I haven't looked at these but hopefully it will take you in the right direction!

http://www.killerphp.com/tutorials/object-oriented-php/

Re: What do the -> symbols do?

Posted: Sat Jan 14, 2012 2:13 pm
by itsmarkk
Thanks for the quick replies!