What does "->" mean in php?
Possible duplicate:
Link - what does this symbol mean in PHP?
What exactly does → do in php?
I am well versed in the basics of php, but never understood. I usually see in applications that use Codeignitor.
This is basically equivalent . in javascript. Both possess properties / methods of objects.
The biggest difference is that only in PHP class es are there objects. Although in JavaScript everything is an object.
Therefore, you cannot make "string"->method() in php, whereas you can make the equivalent in JavaScript of "string".method() .
Well, I would piss you off, because it's a very common operator. However, it is very difficult for Google, so I understand.
This is a class access statement. It allows you to access members and class functions. For example, if I have a class named A with member x, I could access it as follows:
$a = new A(); $a->x;