Page 1 of 1

what is the difference between -> and ::

Posted: Mon Jan 17, 2011 12:50 am
by shamkawai
so, what is the difference between -> and :: ??
thanks

Re: what is the difference between -> and ::

Posted: Mon Jan 17, 2011 11:00 am
by social_experiment
The -> operator lets you access the object's properties and methods.

Found this in a book about object-orientated programming.

Scope resolution operator (::)
The scope resolution operator has the following uses:
It gives access to overridden properties or methods of a parent class.
It is used to call the static methods and properties of a class.
It gives access to class constants.
It is the conventional way of referring to a class method or property in documentation.