Looking at the future of PHP from the design blueprint of ZendEngine2.0_PHP Tutorial

WBOY
Release: 2016-07-13 17:30:32
Original
728 people have browsed it


 Some miscellaneous remarks
 First of all, the original intention of writing this article. It has been a while since I got the design blueprint document about Zend Engine 2.0 (you can also download it from the address in the reference material and have a look). After reading it, I had the urge to write a review - because according to the document The description of the next generation of PHP (as the current mainstream development language) will be a language that is more in line with the existing object-oriented development habits, at least it will be endowed with more object-oriented features. But the question that comes with it is whether a language like php(as the current mainstream development language), with the initial goal of rapid Web development, is worth modifying itself to be comprehensive? This issue seems to require some review articles to discuss, and I am willing to put forward my own opinions. But then some busy things brought this impulse back to my stomach little by little. It wasn’t until recently that I thought of it again, so I read the design blueprint document several times, and this is how I came up with this article. (When I first got this English document, I had plans to translate this design blueprint document into Chinese, but considering that first, it is not the final blueprint, second, everyone should develop the habit of reading the original text directly, and third, the translation is always It will inevitably lead to some obscurities, so I gave it up for the time being. However, when I wrote this article, I decided to "take the risk" of translating it once. Please feel free to correct me if I can't convey the meaning accurately. )
 
The second is. Explanation of the focus of this article - In this review I will mainly comment on the object-oriented features that will be greatly enhanced in the future PHP (as the current mainstream development language) . If you are a developer of php(as the current mainstream development language), then I guess you should know some aspects of the php(as the current mainstream development language) language Object characteristics; but because generally php(as the current mainstream development language) is used in "extreme rapid development environment" (this is a word I coined myself, indicating some customer-oriented The characteristic of website development is that the construction period is very short and the customer requirements are not clear), so there are not many developers and development projects that really use its object features extensively; in addition, the existing PHP (as the current mainstream development Language)The weakness of the object model relative to C++ and Java also limits the use of features in this area. However, in the future versions of php(as the current mainstream development language), the focus of modifications will be on the object-oriented model in the language, improving many bad features in the existing version and adding other features. Therefore, discussing the future of php(as the current mainstream development language) focuses on discussing the object-oriented features of php(as the current mainstream development language).
 
Okay, let’s get down to business and take a look at the new features of Zend Engine 2.0.
 
 Summary of the Zend Engine 2.0 design blueprint (draft)
From the design blueprint (draft) it can be clearly seen that the next generation Zend Engine is based on the new object-oriented model of. If you have ever used the object-oriented features of the existing PHP (as the current mainstream development language) 4, you may find a little bit of Java or C++ feeling while feeling a little awkward - not only There is a lack of object-oriented syntax, and sometimes unexpected results are obtained - all this is because of the existing Zend Engine 1.0 that supports php (as the current mainstream development language) 4 caused by the less elegant object-oriented model in .
 
Simply put, the next generation of Zend Engine will move closer to Java and draw heavily on its object-oriented model. Judging from the types of improved features, they can be divided into three categories: The first category is the improvement and enhancement of the existing object-oriented model, including the definition of builders and destructors, and the addition of private member variables and static members. Object-oriented features such as variables, multiple inheritance, and overloading; the second category is the modification, addition and deletion of the control process, such as adding try/catch/throw exception handling mechanisms; the third category is the modification, addition, and deletion of functions, such as Increment function for string offset. (For details of each type of improvement, you can consult the documents listed in the reference materials.) It can be seen that through the first and second types of improvements, php (as the current mainstream development language) Is gradually improving itself into a language with object-oriented features.
 
 But this is where the problem arises:
On the positive side, languages ​​with object-oriented features are more welcome in today’s programming world (even if the language itself does not build On the basis of object-oriented, you can also add defined objects to prevent the language from falling behind the trend) - In this sense, Zend Engine 2.0 makes php (as the current mainstream development Language)The support for object-oriented will change from tentative contact now to full support in the future, which seems to be more in line with the trend of programming language development; in addition, when building enterprise-level applications (this is also done by php( As the current mainstream development language) is often criticized now), the use of object-oriented methods for modeling and implementation has become a de facto standard, and php (as the current mainstream development language This improvement of ) may cater to this need and solve the weakness of the language itself in this regard.
On the negative side, it seems meaningless to offer developers a new version of php (as the current mainstream development language) that is more similar to Java. The reason why php(as the current mainstream development language) is widely used, in addition to source code disclosure and cross-platform, is probably also an important point to adapt to the simple and fast web programming characteristics of Internet website construction. The extremely short learning time, friendly language style (especially if you are familiar with C) and a large number of extended class library functions are enough to prove its power; but if the next version of such a language is transformed into a similar object-oriented language, Not only will a large number of existing developers be at a loss in a short period of time, but it will also be very detrimental to attracting new developers to join - since there is a language like Java, why bother learning PHP (as the current mainstream development language) What about ?

http://www.bkjia.com/PHPjc/509142.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/509142.htmlTechArticleSome miscellaneous remarks are first of all the original intention of writing this article. It’s been a while since I got the design blueprint document about Zend Engine 2.0 (you can also download it from the address in the reference materials now...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!