what is '->'

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Smaug
Forum Newbie
Posts: 1
Joined: Thu Mar 20, 2008 6:57 pm

what is '->'

Post by Smaug »

Hey all. I was looking through some code and saw the symbol combination '->' used a lot. I have not seen it in any of the tutorials I have used to learn PHP, nor can I find info about it online. I've tried to deduce it's purpose, but I thought I should ask the people in the know as well.

What does the -> mean/do?

Thanks.
hayson1991
Forum Newbie
Posts: 14
Joined: Thu Mar 20, 2008 1:19 pm

Re: what is '->'

Post by hayson1991 »

Smaug wrote:Hey all. I was looking through some code and saw the symbol combination '->' used a lot. I have not seen it in any of the tutorials I have used to learn PHP, nor can I find info about it online. I've tried to deduce it's purpose, but I thought I should ask the people in the know as well.

What does the -> mean/do?

Thanks.
It's the object pointer. Basically object->propertyname gives you the property of the object.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: what is '->'

Post by Chris Corbyn »

Post Reply