Since PHP 5, which was released in 2004, version 7, which was launched in December 2015, is the first PHP innovation in around ten years. Version 6 was also originally planned, but its development was discontinued and some improvements were incorporated into a version 5 release instead. After the failure of version 6, the developers disagreed on whether or not the new version of PHP should carry the previous name declaration, but a majority of the management voted to continue the name with a new version number. The failed version 6 also scratched the company's image, which is why efforts were made to provide PHP 7 with qualitative features.
Large spring-cleaning
In order to restart, it was necessary to remove outdated features for the first time. In a major clean-up operation, interfaces to software that was no longer maintained were removed and various functions were completely removed. Many of the obsolete features already caused error messages and by removing them, programmers will be prevented from working with obsolete features and have to do the work twice in case of an error. In addition, the syntax for variables has been brought into a uniform scheme, but programmers will have to pay attention to this in the future, as it can also change the semantics of expressions. However, this spring clean was not easy, as PHP 5 is already such a complex system, as it often makes more sense to rewrite components in parts instead of tinkering with them.
Facebook and PHP 7
PHP is a language that is influenced by other languages, which in turn influence other languages. Among others, Hack, the language used to develop Facebook is based on PHP. In PHP 7, the developers have also copied some of the development language from Facebook, such as the type diversity. In version 7, they have therefore included some new return types, among others, as well as other new types that are supposed to make programming more structured and easier. Facebook is definitely interested in the two languages moving in a similar direction, as the Virtual Machine used to run Hack is based on standard PHP code. Therefore, some elements of Hack in the originally derived PHP language are also included in the current version.
Unicode support
One of the most important new features of PHP 7 is the improved support of Unicode. Unicode, as the standardization of characters in different languages, has become an indispensable element of programming in times of globalization and thus the provision of versions in different spoken languages. Although it is a very important element of programming, it has not been a subject of much discussion in the programming community so far, which is why developers have waited so long to finally integrate Unicode with UTF-8 in PHP 7.
Other new features
Another important feature is also the much faster speed of PHP 7 compared to the previous version. This is not only due to the removal of obsolete features, but also to the use of hash tables, which make execution much faster. The improved index structure speeds up the search for certain Dataespecially when dealing with such complex systems, as is the case with PHP. In addition, more than 10,000 bugs have been corrected from the previous version and support for 64-bit systems has also been included.
Tips for the changeover
Programmers have just under a year to switch to the new version, as support for PHP 5 will be discontinued in August 2016. With this quick end of support, the developers did not want to make the same mistake as they made with version 5, where no clear end was fixed and support was unnecessarily long. During the migration, programmers should primarily remove outdated code themselves and of course not use it in the future. Unique semantics have made complex constructs superfluous or have to be used much less often, which makes the code more readable. New keywords have been added, such as new datatypes, and PHP 7 has kept to the common terms that are also used by other programming languages.