Why the skip from PHP 5 to PHP 7?
Well, long story short, PHP 6 was a failure. The main feature of version 6 was native support for Unicode characters since PHP is used mainly in web development and the web needs Unicode, so the move to bring Unicode to PHP made sense.
The idea was to bring complete support for Unicode to the core itself. It would have brought extended capabilities to the language, from the ability to use silly emojis as variable and function names, to powerful international string functionality. For instance, when another language uses upper and lower case letters differently from English, or when a name in Chinese characters needs to be converted to English.
PHP 6 was ambitious, but rubbish. That’s how we ended up with PHP 7, skipping version 6 in the process.
Unfortunately, this ambitious plan proved to be a bigger problem than anticipated. Much of the codebase had to be ported to support Unicode for both core and important extensions, which proved tedious and tricky. This slowed down development of other features in the language, frustrating many PHP developers in the process. Additional hurdles showed up, which resulted in less interest in developing a native Unicode support, ultimately leading to the project being abandoned.
Since resources, such as books and articles, had been written for PHP 6 and its Unicode support, the new version would be renamed PHP 7 to avoid confusion.
Anyway, enough dwelling in the sad past, let’s see what PHP 7 brings to the party.
Performance Battle, PHP 7 vs. PHP 5
With virtually all updates, minor performance upgrades are to be expected. However, this time PHP brings a significant improvement over earlier versions making sheer performance one of PHP 7’s most attractive features. This comes as part of the “PHPNG” project, which tackles the internals of the Zend Engine itself.
By refactoring internal data structures and adding an intermediate step to code compilation in the form of an Abstract Syntax Tree (AST), the result is superior performance and more efficient memory allocation. The numbers themselves look very promising; benchmarks done on real world apps show that PHP 7 is twice as fast as PHP 5.6 on average, and results in 50 percent less memory consumption during requests, making PHP 7 a strong rival for Facebook’s HHVM JIT compiler. Have a look at this infographic from Zend depicting performance for some common CMS and Frameworks.
The decrease in memory consumption also allows smaller machines to handle requests better along with the opportunity for building micro services around PHP. The internal changes, in particular the AST implementation, also opens possibilities for future optimisations that could push performance even further. A new, in-house implementation of a JIT compiler is being considered for future versions.



