PHP learning notes PHP Object-Oriented Programming

Source: Internet
Author: User

CopyCode The Code is as follows: <? PHP
/* PHP object-oriented Program Design
*
* PhP5
*
* Array and object: both belong to the PHP compound type (one variable can store multiple units)
*
* Objects are more powerful than arrays. They not only store multiple data, but also store functions in objects.
*
* Three features of an object: encapsulation, inheritance, and Polymorphism
*
* Object-Oriented Programming (OOP) // meets the reusability flexibility and scalability in software engineering
*
* Differences between object-oriented and process-oriented
*
* Minimum unit: function // process-oriented
* Minimum unit: Object // object-oriented
*
* What is an object?
Recently, Sina's management began to cash in and open news revealed that the MBO of that year made it the top shareholder of Sina. Now, it has become the second biggest shareholder. The equity ratio is not much different: it is only 0.1% different from fmr9.24 %, the largest shareholder. However, the Sina management layer has an agreement on selling shares. If this part of the shares may be sold in the future, the management will only have 5.74%. Sina may indeed become an "unowned Company" again ".
This is why Sina, as a company, has troubles in the future: the profit model is unclear and the possibility of being unmaster begins to show up again.
* An object is an object.
* Object:
* Member attributes = variables // defines the object's appearance and status
* Member Method = function // define the object function
*
* What is a class?
* Category, type, and custom type
*
* Define attributes and methods of this type in the class
*
* A Relationship between classes and objects
*
* Declaration class --> instantiate an object (create an object) --> use an object
*
*
* The most rare thing is how to design forward-to-object programs, rather than object-oriented syntax.
*
*/
?>

Author: codenamed Aurora
Source: http://zizhuyuan.cnblogs.com

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.