In previous versions of PHP5, the constructor name must be the same as the class name, which is still available in PHP5, but is now rarely used.PHP5 and later versions, the constructor is declared with the __construct () method, which has the
The constructor appears in the PHP4, and then adds the destructor in the PHP5. This makes PHP more appealing to the object-oriented. When PHP4, the constructor uses a function with the same name as the class to construct this action. For
The PhP5 object compares PHP5 object to its predecessor PhP4 object, but the API function used by the PHP5 object is built using the PHP4 API. If you have read the 10th chapter "PhP4 Object", you will be somewhat familiar with the content of this
The kernel of the object part of the PHP process has been completely redesigned to provide more functionality while improving performance. In previous versions of PHP, the same method of handling objects and processing basic types (numbers, strings)
New features of PHP5: PHP is more object-oriented. PHP has completely re-developed the kernel for processing objects, providing more functions while improving performance. In previous versions of php, the kernels for processing objects and basic
From http://www.ximenyifan.com
"
In PhP4, the constructor of a class is a function with the same name by default.
PhP5 not only follows this naming method, but also introduces some new elements:
_ Construct () is a method name, which is the
PHP5 Although PHP5 has not been officially released (the development version has already been available for download), we can now begin to experience the surprises that the new version will bring to us. In the following introduction, we will focus
Php5| Object Abstract] in the current development of the PHP5, its object-oriented function has been greatly enhanced. What kind of language will the next generation of PHP be? Here's a detailed explanation of the current beta release of
The kernel of the PHP Processing Object section has been completely re-developed, providing more functionality while also improving performance. In previous versions of PHP, objects were handled the same way as basic types (numbers, strings). The
Explain the specific application of PHP5 magic functions. In PHP5 magic function 1 ,__ construct () when instantiating an object, this method of this object is called first. ClassTest {function _ construct () {echobefore ;}}$ t in
PHP5 magic
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.