do you know? In the coming June (2020.6), PHP will have been born for 25 years. As a controversial programming language, what has PHP experienced and how is it going to solve the problems left by history?
php 1.0 1995-06-08 -- First use
(php version development history)
Although PHP is already 25 years old, it does not appear to be old. Instead, it is more willing to embrace the outside world.
This trend is very obvious in PHP 7.4 version, which clearly supports the Foreign Language Interface (FFI) mode and is open to extension packages based on C language. Allow more external extension packages to participate in PHP programming and maintenance work.
Before PHP 7.4, developers were more accustomed to the "built-in battery" model to solve problems. The advantage was that it was simple and easy to understand, but the cost was that the project would gradually change as developers changed and the language evolved. It is difficult to maintain, and opening it up to other languages can help solve this problem.
PHP 7.4 handles three times the number of requests per second than PHP 5.6 and is even about 18% faster than PHP 7.0.
Also worth mentioning is the improvement of preloading capabilities. Developers can use the opcache.preload configuration directive and specify the path to the PHP script to easily enable this mode.
All classes and functions referenced in this script will be permanently loaded into memory and referenced as needed on every server request.
In addition, the resources of each request in the preloading mode are reusable, thus reducing the request time.
Of course, this also means that if you want to change the configuration content, you must restart the server.
Update and maintenance
Due to the update iteration of PHP, the maintenance and update of old packages have become a big problem. HN's discussion hot spots mainly focus on the maintenance of PHP, rather than the development of new projects.
For maintainability considerations, starting from PHP 7.4, it is officially no longer recommended to use PEAR. PHP has launched its own package manager, officially called Composer, and its usage is very close to Python’s pip and Node. npm greatly reduces the maintenance difficulty for developers.
Security
If nothing unexpected happens, PHP 7.X will be with us for a long time. According to the news, the alpha version of PHP 8.0 will be released in June , existing PHP bugs will be fixed in the 8.X era, and the main updates will focus on security.
In fact, whether you agree or not PHP is the best language in the world, the security issue of PHP is a worry for developers, but any programming language has loopholes.
The official removal of safe_mode in the PHP 5.4 era discouraged a large number of developers. After realizing the problem, PHP re-supported this mode.
Although it has been repeated, it is always a good thing. Recently, PHP has begun to use the Argon2 password-hashing algorithm, which has been the winner of many years of cryptographic hashing algorithm competitions, perhaps to show its emphasis on security.
In any case, PHP has gone through 25 years and has made unique contributions to the colorful WEB development world. It has also been proven by developers that PHP is the world's The best language! I hope that PHP will continue to be brilliant and continue to bring surprises to developers!
Related recommendations
2. My sad job search Lu: If you can, learn PHP instead of Python
3. Why is PHP the most suitable programming language for novices?