In PHP 5, what is the difference between using
$thisto refer to the current object. Use
selfto refer to the current class. In other words, use
$this->memberfor non-static members, use
self::$memberfor static members.
What is Class and Object ?
A class, for example, is like a blueprint for a car. It defines the shape of the car on paper, with relationships between the different parts of the car clearly defined and planned out, even though the car doesn't exist yet .
An object, then, is like the actual Car built according to that blueprint. The data stored in the object is like the gear, wires, and metal that compose the car: without being assembled according to the blueprint, it's just a pile of stuff. However, when it all comes together, it becomes an organized, useful car in running condition .
What is difference Between SOAP and REST
Read here in detailed answer