New PHP will move to Java _php Foundation

Source: Internet
Author: User
Tags php software php source code zend

The so-called "PHP" is open source Web application development/operation environment, a few days ago, "Nikkei open System" Reporters on the future development of the PHP Development Center program and other issues interviewed the center members Zeev Suraski. Zeev Suraski says the new version of PHP will import try, catch, and so on to get closer to Java, making it easier to develop large systems. (Interviewer: Takahashi Trust)

--Please talk about the cause of your decision to develop PHP.

Rasmus Lerdorf first published PHP in 1995. When I was working on an Israeli university web page and online store site in 1997, I used a tool called PHP/FI (Personal home page/form interpreter) When I started to come into contact with PHP. In the course of use, a large bug was found. Because the source code is public, so I investigated the cause of the bug and made changes, in the survey found that there is still a lot of room for improvement. The Php/fi script execution engine was modified along with Andi Gutmans, who was working on the project. After the modified execution engine is handed to Lerdorf, it becomes the official execution engine of the new PHP3.0.

By improving the script execution engine, we developed a higher speed Zend Engine. The name Zend is a combination of Zeev and Andi. PHP embedded with Zend Engine is the current version of PHP4. The original program is read-side interpretation to perform, and then changed to each of the execution cycle interpretation once, so the implementation of 100 cycles will be performed 100 times the same interpretation process. Zend Engine, in the beginning, interprets the entire file's script before it starts execution. The pace of implementation has been greatly enhanced by a sharp reduction in the interpretation process.

PHP4 was downloaded 265,000 times within 2 months of publication. PHP is currently installed at least 6 million domain name servers, according to Netcraft, a US research firm.

I think the main reason for the popularity of PHP is simplicity and practicality. Someone in my e-mail said: "Although there is no programming experience, but I use PHP in only 3 hours to write a simple program." This is not the extent of using Java. In addition, PHP is developed for WWW, so you can easily process cookies and forms.

PHP is free and will continue to be released free of charge, but in 1999, the Israeli Zend was established and developed with high-speed PHP software and comprehensive development tools, taking into account the requirements of commercial costs and support products.

-What features are you going to expand in the new PHP5 scheduled to be released at the end of 2002?

The object-oriented functionality will be further improved to make the development of large-scale systems easier. Although PHP already has classes and subclasses, PHP5 will be closer to Java. A special processing statement structure, such as try, catch, and so on, will be introduced.

In PHP4, a function is used as a variable, even if an object is not changed. PHP can be standard assignment, objects can also be assigned values, so the function value is not the object itself, but a copy of the value. When a function needs to be changed to a value of an object, it should be specifically prompted with the "&" symbol before the object as a variable. This is not required in Java, and PHP5 is in the same pattern as Java.

In addition, PHP5 also imports the namespace (name space), and after the namespace is determined, the valid ranges of functions, variables, and class names are limited within the namespace. When the name range is clear, duplicate names can be ignored when using variables and function names, which also facilitates the development of large programs.

The new feature called "Stream" is also a handy feature. It enables the WWW server to use the same functions as the local files on the FTP server. That is, fopen (local file name) can be used like fopen (hppt://hostname/filename). Compressed files can be treated like normal uncompressed files. And you don't have to wait for the PHP5 to install "stream" in the PHP4 that is released later.

It is pointed out that because PHP is HTML-embedded, it is difficult to presentation the display (and the logical part) as Java.

In fact, using PHP can completely separate the display from the logical part. PHP has a feature that brings up Java objects. PHP can be used as a display layer and Java objects as a logical layer.

Another approach is to use the template Library Smarty method. Smarty is a tool that dynamically generates HTML from an HTML template. HTML-compliant PHP results can be generated even if the PHP logic is not written completely in HTML.

However, it is not that in any case separating the display from the logic is advantageous. For example, in the development of small systems, the separation becomes more complex, it is difficult to grasp the overall, ultimately affect the development efficiency, which is the disadvantage.

-At the end of February 2002, PHP was found to have serious security vulnerabilities.

PHP has not had any serious security vulnerabilities for 5 years, but unfortunately found a problem with the file upload function at the end of February.

We consider security to be critical and have taken 2 measures: first, the patch was produced and published within 30 hours of receiving the vulnerability report. There is no guarantee that there will be no security holes in any of the software. If serious security breaches are detected in the future, we will continue to do our best and take prompt remedial action.

Second, we have started to check the PHP source code, launched a security check. Even if it is not your own security vulnerabilities, you should examine and correct the parts of the problem that may arise.

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.