PHP Object-oriented basics-concept

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.