[Solved] When to use $this and when simple variable
In OOP:$this->name is property of the object which is defined by the class and is accessible globally within the object.$name is variable used inside the class method and is accessible locally only within the object method (a function) Very briefly: class myClass{ private $name = “record.log”; function myMethod(){ $name=”this exists only in the method myMethod()”; … Read more