


Looking at the future of PHP from the design blueprint of ZendEngine2.0_PHP Tutorial
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 ?

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











PHP and Python each have their own advantages, and choose according to project requirements. 1.PHP is suitable for web development, especially for rapid development and maintenance of websites. 2. Python is suitable for data science, machine learning and artificial intelligence, with concise syntax and suitable for beginners.

PHP is widely used in e-commerce, content management systems and API development. 1) E-commerce: used for shopping cart function and payment processing. 2) Content management system: used for dynamic content generation and user management. 3) API development: used for RESTful API development and API security. Through performance optimization and best practices, the efficiency and maintainability of PHP applications are improved.

PHP is a scripting language widely used on the server side, especially suitable for web development. 1.PHP can embed HTML, process HTTP requests and responses, and supports a variety of databases. 2.PHP is used to generate dynamic web content, process form data, access databases, etc., with strong community support and open source resources. 3. PHP is an interpreted language, and the execution process includes lexical analysis, grammatical analysis, compilation and execution. 4.PHP can be combined with MySQL for advanced applications such as user registration systems. 5. When debugging PHP, you can use functions such as error_reporting() and var_dump(). 6. Optimize PHP code to use caching mechanisms, optimize database queries and use built-in functions. 7

PHP is still dynamic and still occupies an important position in the field of modern programming. 1) PHP's simplicity and powerful community support make it widely used in web development; 2) Its flexibility and stability make it outstanding in handling web forms, database operations and file processing; 3) PHP is constantly evolving and optimizing, suitable for beginners and experienced developers.

PHP and Python each have their own advantages, and the choice should be based on project requirements. 1.PHP is suitable for web development, with simple syntax and high execution efficiency. 2. Python is suitable for data science and machine learning, with concise syntax and rich libraries.

PHP and Python have their own advantages and disadvantages, and the choice depends on project needs and personal preferences. 1.PHP is suitable for rapid development and maintenance of large-scale web applications. 2. Python dominates the field of data science and machine learning.

PHP is suitable for web development, especially in rapid development and processing dynamic content, but is not good at data science and enterprise-level applications. Compared with Python, PHP has more advantages in web development, but is not as good as Python in the field of data science; compared with Java, PHP performs worse in enterprise-level applications, but is more flexible in web development; compared with JavaScript, PHP is more concise in back-end development, but is not as good as JavaScript in front-end development.

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.
