Dream. Dare. Do – that is Suyati’s work principle in a nutshell.
PHP, like all software, keeps on evolving, with every new release bringing in new features. In between the major releases are minor releases that mainly fix bugs and make a few minor tweaks.
In August 2014, after a lot of discussion and voting, the PHP community decided on PHP 7 as the next major version of PHP. While this is normal, what is of interest is that PHP 7 would replace PHP 5.x, and a major point of discussion was on whether to name the new update as PHP 6, the logical progression, or as PHP 7.
In the end PHP 7 prevailed.
What happened to PHP 6?
Those in favor of PHP 7 claim that PHP 6 was the name of a PHP branch that was killed in 2010 and assigning the same name would cause confusion.
PHP 6 was a very ambitious development initiated in February 2005 by a small band of developers from Yahoo, Zend and the core PHP development community. Lack of Unicode support is a big drawback of PHP, and this development aimed at addressing this shortcoming, by introducing Unicode support as standard in all PHP text handling, in PHP engine, extensions, and API. Unicode is a composite industry standard for consistent encoding, representation and handling of text expressed in most writing systems of the world. It provides a unique number for each character regardless of the platform, program or language, thereby simplifying development considerably.
Initially intended as a PHP 5.x version, extensive changes mandated a major version bump and thus the work on PHP 6 was initiated. The project had a good beginning, with a successful proof of concept developed. However, a gross shortage of developers who actually understood the necessary changes and performance issues that arose when conversion was done to and from UTF-16, created big stumbling blocks; to the extent that the project had to be aborted in 2010. Implementation was deemed technically too difficult and a majority of those in the PHP community were wary of converting large chunks of already working code. Some clean-ups and improvements such as traits and closure re-binding, which the Unicode project achieved, were back-ported to PHP 5.4 and life moved on without Unicode support.
The case of PHPNG
In the meantime, Unicode notwithstanding, Facebook wanted certain features in PHP, and tired of waiting for it, decided to go ahead and do it themselves. For instance, the PHP core developers always considered the effort to make the Zend Engine-based PHP fully thread safe as too complicated. But it was not too complicated for the developers at Facebook, who went ahead and made its HHVM-based implementation as thread safe as it should be.
In no time, Facebook’s Hack, an open-source programming language for the HipHop Virtual Machine (HHVM) posed a stiff challenge to conventional PHP. The Hack language provides many features that PHP users want but are not available. Some of these features are:
PHP developers always put off developing such features, claiming that it would take a lot of time and effort. With Hack in the fray, they no longer had the luxury of such excuses.
To counter the challenge posed by Hack, Dmitry Stogov of Zend launched a quasi-secret development branch of PHP, named PHPNG (PHP Next Generation). PHPNG aimed to infuse PHP with a whole new level of performance and memory usage efficiency.
Apart from the above mentioned Hack features that PHP lacks, PHPNG offered a JIT engine. The JIT engine is capable of compiling Zend opcodes into native machine code dynamically, and would make the code run faster.
PHPNG remains a work in progress, and as such, the full list of proposed features is not yet known, or even defined. However, whatever work done until now seems promising. Server tests clock 20% more requests per second when testing PHPNG with a WordPress installation. However, all PHP applications do not yet benefit from similar performance improvements, and this will not result in speed improvements anyhow.
From PHPNG to PHP 7
The original intention was to merge the PHPNG branch into PHP 6 when complete. However, with PHP 6 being abandoned, it is expected that the PHPNG branch will be merged into PHP 7.
In parallel to the discussion on the naming of the next PHP major version as PHP 6 or PHP 7, a proposal was presented to turn the PHPNG branch as the base of PHP 7. This is most likely to happen, and the new PHP 7 will, in all probability, be a merger of PHPNG to mainstream PHP 5.x version.
Apart from the improvements proposed and intended in PHPNG, such as Asynchronous Programming, JIT engine and more, the new PHP 7 would most likely include the following additional features.
While it is too early to say when PHP 7 would eventually roll out, what is certain is that it is interesting times ahead as PHP is shaken from its lethargy and is trying to catch up with Hack.