View Full Version : The :: operator

11-19-2003, 10:12 AM
How do they work?

For example what does this mean:

11-19-2003, 10:31 AM
The "::" operator is used to call a class' method statically. This means that you use the method as if it were a normal function, you only have to tell PHP where this function is. That's why you need to put the class name left of the operator.

Keep in mind that when a method is called statically, there is no $this reference set. $this exists only if you call a method on the object itself.