In the initial object-oriented learning, the first thing to grasp is the previous learning of the PHP foundation of the structured programming and the current PHP intermediate stage object-oriented differences.
Structured programming lies in the design of the program based on the problem to be solved, and object-oriented programming is designed according to the object in the problem domain.
On the basis of this, we also need to understand the relationship between classes and objects: In my opinion, the class is the category, the object is a concrete existence of a thing, also has the object of everything. In general, we classify things by analogy with the object-oriented way of identifying things. The relationship between a class and an object is summarized as a class is an object's abstraction, and an object is an instance of a class.
Creating a class in PHP requires the use of the keyword class, which consists of an access modifier and a member variable name.
PHP Object-oriented basics-concept