Is there any reason to use class variables (i.e. '$this->variable') rather than 'local' variables (i.e. '$variable') in cases where the variable is only accessed within a single class method?
It seems that unless you need to:
a: assign a value to a variable from outside the class:
$foo = &new Foo;
$foo->var = 'the monkey';
b: reference a variable outside the class, so you can alter a value without returning something from a method
$title = 'old title';
$foo = &new Foo;
$foo->title = &$title;
$foo->changeTitle('new title'); // method sets new value for $this->title inside Foo class
or
c: refer to the variable from multiple methods inside a class
you're best off just creating the variable locally inside the method and using it as needed - $variable instead of $this->variable.
Is there an advantage, or a best-practices dictate, that says I should use $this->variable when there's no immediately apparent logical reason for it?