Object-Oriented Programming (OOP) groups related data (properties) and behavior (methods) into blueprints called classes. You create instances of a class using the new keyword, and access the current instance inside methods using $this.
ADVERTISEMENT