When calling a method in the same class from within another method, is it better to use $this
or to avoid it, or is there no difference at all?
One benefit I can see with using $this
is that it is explicit. For example:
class A {
public function a() {
$x = $this->b();// or $x = b()
}
public function b() {
//
}
}