The main features of PHP 7
A complete set of innovations PHP 7 still is not defined. But for some, we can already say, t. To. They are already realized. On the other, we can only assume, based on the sound characteristics.
By the way, even before the release of PHP 7 will very likely PHP 5.7.
1. Huge performance improvements
The main aim was to bring PHPNG performance improvements to at least match what provides HHVM on Facebook.
Sourasky bond (Zeev Suraski) from Zend wrote an article in which he openly admits that took HHVM as a competitor (Zend Engine, based on) PHP. It simply confirms that the release HHVM, and then the Facebook Hack was the trigger huge interest Zend continue to maintain a lead embodiment of PHP.
In this article, it also demonstrates how far the branch PHPNG evolved in terms of improving performance.
2. JIT engine
According to Dmitry Stogova (Dmitry Stogov) from Zend, PHPNG development was started with the motivation to explore the introduction of JIT engine for the Zend Engine, based on PHP
JIT engine can dynamically compile opcodes (opcodes) to native machine code that eventually will make the code run faster the next time he will be executed.
While the introduction of JIT engine is not done in a branch PHPNG, Dmitry mentioned in May that he “spent a considerable amount of time to experiment with the JIT, and even created a PoC (Proof of concept – a prototype) LLVM, based on the JIT compiler built in OPCache».
Hence, it is definitely in the plans to bring Zend allow JIT engine in PHP 7, according to the bond so Sourasky (Zeev Suraski) it can “it can break through the ceiling already achieved performance for the already over rapid implementation.”
3. AST: Abstract Syntax Tree (abstract syntax tree)
Recently Nikita Popov (Nikita Popov) proposed the introduction of creating an abstract syntax tree as an intermediate step to the process of compiling PHP.
This is not the first time Nikita suggested introducing the compilation step AST. He had already offered it in 2012.
AST will provide several advantages, which he describes in his proposals, including the potential for further optimization, which will make PHP work even faster.
In the last sentence, he describes the possibility of opening AST PHP extensions and applications of user level. This may open the door to more interesting instruments such as static code analyzers that are often useful in identifying sources of error or level of capacity to optimize your PHP code.
Nikita has offered a patch to support the implementation of AST in branch PHPNG
4. Asynchronous programming
It is obviously not for everyone, but recently Julien Poly (Julien Pauli), one of the latest releases accompanying PHP, commented on the reorganization layers multiplexing PHP I / O (input-output).
This seems to be a necessary step for the realization of the cycle events. The cycle of events – a piece of code that takes care of the events related to the interception operations of I / O (input-output) and other asynchronous tasks that can be run in parallel, such as access to files, networks, databases, timers, etc.
In simple words, it will allow future versions of PHP easy to implement support for parallel execution of tasks within a single query, so make a breakthrough in the potential to improve performance of PHP on a completely new level.
Of course, you do not get an automatic performance boost by simply turning support for asynchronous programming. New PHP code should be written to take advantage of the potential of asynchronous programming.
Despite initial efforts Gina Fields, it does not mean that support for the built-in asynchronous programming in PHP will be used 7.
However, since the Facebook Hack already provides support for asynchronous programming very elegant way, I would not be surprised if the PHP core developers will move faster towards the creation of asynchronous programming in PHP, and it will be available sooner or later.
5. Stand-alone multi-threaded Web server
This is what seems to be no plans for PHP 7, but it’s something that can make PHP more scalable.
PHP may already be running out of multithreaded web servers such ngynx, lighttpd or Apache in operation, however, is not the same thing as having a running PHP on your own multithreaded web server.
Multithreaded web server can handle many simultaneous requests using a single storage pool, thus avoiding waste of memory that occurs when PHP is running as FastCGI mode or Apache pre-fork.
It would also allow PHP to use a single pool of database connections, ie. A. Minimizing the number of simultaneous open connections to the database during peak access.
HHVM can already be run as a stand-alone multi-threaded Web server from the days when the project was called HipHop PHP compiler.
This makes it possible to reduce the bit Facebook server machines required to operate in a high-load access, they have
Unfortunately run PHP as a stand-alone multi-threaded Web server is not included in the plans for PHP 7 certainly is great to have this thing at least PHP 8.
When the day of release PHP 7?
It is too early to make assumptions about the actual date of release of PHP 7. Different people have suggested that it will be between 1 and 3 years. An educated guess to wait the final release of PHP 7 sometime in 2016, although it is not impossible to see the early alpha version as early as 2015.
Ie at the earliest after a year you can try PHP 7.
Recent developments in the PHP language was, of course, exciting.
Frankly speaking, most of these innovations were the result of the movement in the direction of Facebook HHVM and programming language Hack. I think all we have to thank Facebook for a push.
I suspect that they did it on purpose, I mean advanced HHVM and Hack to key developers of PHP woke up and move faster. If so, it worked! However, it has benefited the entire PHP community as a whole, therefore, should not be dissatisfied.