Basic object-oriented learning in PHP

Source: Internet
Author: User
What is an object

All things in the world are objects (can be visible or some abstract concepts, etc.)


The basic composition of the object
1. The constituent elements of an object (attributes)
2. Object behavior (method)

Features of the object:
1, each of the objects are unique
2, the object is a specific thing, his function is to complete a specific function,
3. Objects can be reused

Why object-oriented
1, the object description way more close to the real world, is advantageous to the large-scale business understanding

The essence of object-oriented
1, object-oriented is to solve problems in life to be stored in the way of objects (properties, methods)
2. Interaction between object and object through method invocation

The basic idea of object-oriented
First step: Identify objects
Step two: Identify the properties of an object
Step three: Identify the behavior of an object

Object-oriented Basic principles
1, the object inside is high cohesion
2, the object is low-coupling external

Basic object-oriented learning in PHP

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.