PHP -> pointer help

HI, can someone tell me what the following is “->” I cannot find anything in the manual about it, I know it must be some sort of variable pointer or something. Some sample code where I am trying to use it is:


Basically I need to know what -> is and how to use it…thanks

Object-Oriented Programming ;)

The variable $bc in your example is a reference to an instance of a class, or, more specifically, an object. This object has a method (function) called draw(). The -> simply tells PHP that the method draw() is found in the object referenced by $bc (or more specifically, that the method draw() -in- the object referenced by $bc should be called).

Sponsor our Newsletter | Privacy Policy | Terms of Service