Posted by gg9h0st on 05/26/06 11:36
i really wander what makes static method special?
in fact i can access a non static method statically using '::'
class aclass {
function anonstatic() {
echo 'non static';
}
static function astatic() {
echo 'static';
}
}
$aobj = new aclass();
aclass::anonstatic();
//it works.
$aobj->astatic();
//it works too.
i see a diffrence that i can't use $this in static method but nothing.
i don't feel there's no reason i have to make a mothod static.
is there any reason i have to declare a mothod as static?
apache2.0/php5.14
Navigation:
[Reply to this message]
|