Hi, my name is Nikolay Krapivny, I lead the server-side development department at Badoo. In Badoo, PHP is one of the main languages and most of the business logic of our system is written in it. Therefore, we follow the news from the world of PHP, actively participate in the development of the language and try to develop a community around PHP .
Today I would like to share a translation of the letter from Zeev Suraski , one of the founders of Zend Technologies, which outlines the further development of PHP and sheds light on what we can expect in PHP 8.I was going to write about this a little later, but since I’ve brought up the topic of PHP 8, it seems it’s time to start a discussion.
I emphasize: the purpose of this letter is not to discuss in detail every change I mentioned, but rather to consolidate our plans: are we going after 7.3 to focus on PHP 8, which is based on some of our research projects and experimental designs.
There are a number of areas for the development of which, I think, it is necessary to direct resources in the next major version.
JIT
Probably many of you know that we have spent a lot of effort on implementing JIT on top of the PHP 7 infrastructure. There is good and bad news. Good: as was the case with the experiments with JIT, which we carried out in 2014, we obtained impressive results of benchmarks with heavy CPU loads. And the bad news is that the JIT for our tests does not give a big win on typical web loads.
In other words, unlike the situation in 2014, we believe that JIT will not improve performance when handling typical web workloads, since executing PHP code is no longer a bottleneck.
But I still think that we need to include JIT in the next major version of PHP. At least for two reasons:
- This will allow PHP to handle new types of workloads (not the web).
- PHP , (, PHP-
unserialize()
C).
, , - , -, (
. Badoo: . CPU , CPU ).
, , , JIT OPcache ( ) , .
, , PHP 7.0 JIT-:
https://www.youtube.com/watch?v=dWH65pmnsrI(long-running), , . , , Node.js , . . , PHP , , ReactPHP Swoole.
, - PHP . , - , , Swoole. , , /, . , , . , libuv, , , PHP-.
(Foreign Function Interface)
PHP , ++, . , , , , , . PHP «» , ; — «» , . (
.: ) . TensorFlow PHP, , , PHP:
98%. , JIT PHP , . , ( JIT), , , , .
, JIT PHP 8, . «» PHP, ( FFI). JIT PHP , . , -, ( , ) , .
(.: : « — PHP- PHP; , , request- include/require. , PHP». .), :
- . - , , PHP 8.
- . , , RFC , - .
— , ( — , JIT), PHP 8 PHP 7.3 PHP 7.x. PHP 8 , , , 2—2,5 ( / 2020-). PHP 7.4 - 2019-, , (deprecate) , , PHP 7.3, PHP 8.
PHP 8 7.3, . , , RFC «PHP 8 feature- PHP», 7.4; ( ) . , - ( ), // .
, , «» . , CPU -.
PHP 8 PHP ? .