The new version of PHP will move closer to Java_PHP Tutorial
The so-called "PHP" is an open source web application development/running environment. Recently, a reporter from "Nikkei Open System" interviewed Zeev Suraski, a member of the center, about the future development plans of the PHP development center. Zeev Suraski said that the new version of PHP will import try, catch and other statements, making it closer to Java and making it easier to develop large systems. (Interviewer: Nobu Takahashi)
--Please tell us about the reasons why you decided to develop PHP.
Rasmus Lerdorf first announced PHP in 1995. In 1997, when I was making the Israeli University web page and online store site, I used a tool called PHP/FI (Personal Home Page/Form Interpreter) at the time, and that's when I started to come into contact with PHP. During the use, a big bug was discovered. Since the source code is public, I investigated the cause of the bug and made modifications. During the investigation, I found that there is still a lot of room for improvement. So I modified the PHP/FI script execution engine with Andi Gutmans, who was working on the project together at the time. After the modified execution engine was handed over to Lerdorf, it became the official execution engine of the new version of PHP3.0.
By improving the script execution engine, we have developed a faster Zend Engine. The name Zend is a combination of Zeev and Andi. PHP embedded with Zend Engine is the current version PHP4. The original program was interpreted and executed while being read, but later it was changed to interpreted once per execution cycle. Therefore, the same interpretation process must be performed 100 times to execute 100 cycles. Zend Engine interprets the script of the entire file at the beginning and then starts execution. Because the interpretation process is significantly reduced, execution speed is greatly improved.
PHP4 was downloaded 265,000 times within 2 months after its release. According to statistics from the American research company Netcraft, PHP is currently installed on at least 6 million domain name servers.
I think the main reason why PHP is popular among people is that it is simple and practical. Someone once said in an email to me: "Although I have no programming experience, I wrote a simple program using PHP in only 3 hours." This is not possible with Java. In addition, PHP was developed for the WWW, so it can also handle cookies and forms easily.
PHP is free and will continue to be released for free in the future. However, considering the requirements of commercial costs and supporting products, Zend Israel was established in 1999 and developed high-speed PHP software and comprehensive development tools for sale.
--What functions are planned to be expanded in the new version of PHP5 scheduled to be released at the end of 2002?
Object-oriented functionality will be further improved to make the development of large systems easier. Although PHP already has classes and subclasses, etc., PHP5 will be closer to Java. Special processing statement structures in Java such as try and catch will be introduced.
In PHP4, functions are used as variables and will not change even if an object is given. PHP can perform standard assignment, and objects can also be assigned values, so the function value is not the object itself, but a copied value. When a function needs to be changed to an object value, it is necessary to add an "&" symbol before the object as a variable to specifically prompt it. There is no need for such a prompt in Java, and PHP5 uses the same pattern as Java.
In addition, PHP5 also imports name space (Name Space). After the name space is determined, the valid range of functions, variables, and class names are limited to the name space. When the name range is clear, duplicate names can be ignored when using variable and function names, which also facilitates the development of large programs.
The new feature called "stream" is also a convenient feature. It allows files on the WWW server and ftp server to use the same function as local files. That is, fopen(local filename) can be used like fopen(hppt://hostname/filename). Compressed files can be processed like normal non-compressed files. And there is no need to wait for PHP5, "stream" will be installed in PHP4 released in the future.
--Some people pointed out that because PHP is HTML embedded, it is difficult to separate the presentation from the logical part like Java, and it is difficult to achieve modularization.
In fact, using PHP can completely separate the display and logic parts. PHP has a function to call out Java objects. You can use PHP as the display layer and Java objects as the logic layer.
Another method is to use the template library Smarty. Smarty is a tool for dynamically generating HTML from HTML templates. Even if there is no PHP logic written in HTML, PHP running results that conform to HTML can still be generated.
However, this does not mean that it is advantageous to separate display and logic in any case. For example, when developing a small system, it becomes more complex after separation, making it difficult to grasp the whole, which ultimately affects development efficiency. This is the disadvantage.
--At the end of February 2002, PHP was found to have serious security vulnerabilities.
PHP has not had a serious security vulnerability in 5 years, but unfortunately, a problem with the file upload function was discovered at the end of February.
We believe that security is of paramount importance and have taken 2 measures: First, we produced and published a patch within 30 hours of receiving the security vulnerability report. No software can guarantee that security vulnerabilities will never occur. If serious security vulnerabilities are discovered in the future, we will still do our best to take remedial measures quickly.
Secondly, we have started to check the source code of PHP and launched security checks. Even if it is not your own security vulnerability, you should check and correct the parts that may cause problems.

What’s still popular is the ease of use, flexibility and a strong ecosystem. 1) Ease of use and simple syntax make it the first choice for beginners. 2) Closely integrated with web development, excellent interaction with HTTP requests and database. 3) The huge ecosystem provides a wealth of tools and libraries. 4) Active community and open source nature adapts them to new needs and technology trends.

PHP and Python are both high-level programming languages that are widely used in web development, data processing and automation tasks. 1.PHP is often used to build dynamic websites and content management systems, while Python is often used to build web frameworks and data science. 2.PHP uses echo to output content, Python uses print. 3. Both support object-oriented programming, but the syntax and keywords are different. 4. PHP supports weak type conversion, while Python is more stringent. 5. PHP performance optimization includes using OPcache and asynchronous programming, while Python uses cProfile and asynchronous programming.

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.

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

PHP remains important in the modernization process because it supports a large number of websites and applications and adapts to development needs through frameworks. 1.PHP7 improves performance and introduces new features. 2. Modern frameworks such as Laravel, Symfony and CodeIgniter simplify development and improve code quality. 3. Performance optimization and best practices further improve application efficiency.

PHPhassignificantlyimpactedwebdevelopmentandextendsbeyondit.1)ItpowersmajorplatformslikeWordPressandexcelsindatabaseinteractions.2)PHP'sadaptabilityallowsittoscaleforlargeapplicationsusingframeworkslikeLaravel.3)Beyondweb,PHPisusedincommand-linescrip

PHP type prompts to improve code quality and readability. 1) Scalar type tips: Since PHP7.0, basic data types are allowed to be specified in function parameters, such as int, float, etc. 2) Return type prompt: Ensure the consistency of the function return value type. 3) Union type prompt: Since PHP8.0, multiple types are allowed to be specified in function parameters or return values. 4) Nullable type prompt: Allows to include null values and handle functions that may return null values.


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

Dreamweaver Mac version
Visual web development tools

WebStorm Mac version
Useful JavaScript development tools

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.