Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- PHP Classes :: & ->
August 5, 2005, 1:46 pm
rate this thread
Re: PHP Classes :: & ->
:: calls a class method statically - that is, you don't have to have an
instance of the class.
-> calls a class method as part of an object.
If you have something like:
$x = new MyClass();
Then you'd use $x->method() to call the methods in the class as part of
You can also do something like:
$res = MyClass::isError($obj);
In most cases, static methods need a parameter, unless they are simply
Justin Koivisto, ZCE - firstname.lastname@example.org