Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- What is diffrent betwenn :: and ->
July 13, 2005, 12:37 am
rate this thread
Re: What is diffrent betwenn :: and ->
calls the *static* method "staticMethod" in ClassName.
:: is the operator the access static methods.
Static methods can be called without having an object of the concerning
class. Therefore static methods (actually a function a class) may not
$object->method() calls the method "method" of the object referenced by
"$object". Non-static methods work with the state of the object they
If you still do not know the difference between static and non-static
methods you should consult some OOP-explaining websites or books.