OOP question
Posted: Tue Oct 28, 2003 4:56 am
Hi,
just a little thing:
You declare variables in a class like
var $myvar;
and access them like $this->myvar.
Now I've seen someone using a variable in a function (method) of a class without $this->.
Is this generally wrong, or is it allowed when you use that variable only inside that function?
just a little thing:
You declare variables in a class like
var $myvar;
and access them like $this->myvar.
Now I've seen someone using a variable in a function (method) of a class without $this->.
Is this generally wrong, or is it allowed when you use that variable only inside that function?