Posted by Michael Fesser on 01/13/07 10:43
..oO(Sanders Kaufman)
>I read that, but I'm still a little confused.
>When I use a class's methods and such, I've been using "->".
>But it seems like this "::" is used the same way.
>What's the difference?
$someObject->method()
someClass::staticMethod()
'->' requires an instance of a class, whereas '::' is used to call
static class methods or constants without having an object. Additionally
it's used to call inherited methods.
Micha
Navigation:
[Reply to this message]
|