A little confused about calling class variables
Posted: Fri Sep 12, 2008 12:00 am
Okay, if I have:
I know I can call A::func(), but can I not call A::var to display the word 'test'? Do I HAVE to create first an object A, and then call it A->var? Or is there a way I just don't know about?
Thanks.
Code: Select all
class A {
public $var = 'test';
function func() {
}
}Thanks.