Recently, the release date for PHP 7 was announced and it created a huge buzz around the internet with a set of advanced features and performance upgrades. It also generated a lot of confusion as to whether you should upgrade to PHP 7 or not; and if Yes, then how soon?
We will try to clear this confusion by using the example of our Client who has been attached to vteams for almost 2 years. He had a large enterprise level application developed using engineers from vteams. The application was developed using PHP 5.6 and took almost 1.5 years to complete. Soon after its release, PHP 7 was announced so now our Client is confused whether he should immediately spend resources on upgrading the application to PHP 7? or should he wait for some time?
Things Good About PHP 7:
Our Client has read all sort of good things about PHP 7 on the internet. Mainly highlighting the following points:
- Engine Rewriting: PHP uses Zend Engine (it drives and executes everything in PHP). PHP 7 completely rewrote Zend Engine. It has changed how PHP works and allowance for new features to be integrated.
- Speed improvement: Speed has been greatly improved in PHP 7. Its request handling limit has doubled from PHP 5.6. It is also taking less time to respond to each request. Speed improvement has been best explained in “Rasmus Lerdorf” presentation on PHP in Australia using WordPress 4.1 benchmark.
- Language Enhancement: Client has also found out that PHP 7 introduced a lot of new features to its programming language (also known as Geek Stuff). These features include:
- Removing ereg library
- Removing ASP style tags
- Introducing Uniform variable syntax for variable-variable expression processing
- Return type hinting
- New operators (i.e. Spaceship operator)
- Scaler type hinting
- Null coalesce operator
- Memory Efficiency: PHP 7 has changed the handling of data internally, so now it has been able to improve memory related operations time up to 3.5x as compared to PHP 5.6.
What Is Wrong With PHP 5?
After reading all of the great features about PHP 7, our Client started wondering what is wrong with PHP 5. After digging the internet and processing a lot of information, he discovered the answer to his question that “there is nothing wrong with PHP 5”. PHP 5 provides all the features PHP was intended for. PHP 7 is just a new version harnessing latest technological improvements and built with future in mind. Just like there was nothing wrong with IPhone 5, but still IPhone 6 was introduced by Apple.
Where Is PHP 6?
While gathering information about PHP 7, our Client was curious as to why PHP moved from version 5 to version 7. After searching out from Google, he found out the fate of PHP6. PHP 6 was an experimental PHP version with Unicode support which was never released to the public but people adopted name of PHP6 and wrote books, made websites etc. After mutual consensus, it was decided to replace name of PHP6 and changed the name PHP7 for the new release.
Moving From PHP 5 To PHP 7?
Client now had all the data to answer his fundamental questions about PHP 7 as follows:
- Will my PHP 5 application work with PHP 7?
Answer to this question depends on each application and some expert engineer can answer this question after looking at the source code of the application. Client consulted vteams’ engineer who is still working in his team responded by letting him know the appropriate status of his application regarding PHP 7 compatibility.
- How long will it take for upgrading application to PHP 7?
Again the answer to this question varies from application to application and you should consult an expert engineer to review your application.
- How many people have adopted PHP 7?
Client wanted to gather suggestion of different people who have adopted PHP 7 for their commercial application only to find out that so far PHP 7 has been adopted only for testing purposes. First public release of PHP 7 is scheduled for 12 November, 2015. General public will start to adopt PHP 7 after this release, so issues in it will be highlighted only after it is adopted by different members of general public.
- How long PHP 5 will be supported?
Our Client is really careful about the bugs and security updates for his PHP instance, so he researched the support life cycle of PHP 5. He found out that PHP 5.5 is supported until June 2016 and PHP 5.6 is supported until August 2017. There is enough time to move to PHP 7 if he does not decide to instantly move from PHP 5.6.
PHP7 is the future of PHP and all the applications will need to upgrade to PHP 7 sooner or later. After considering all the Pros and Cons of PHP 7 & PHP 5.6 and consulting with vteams’ engineers, our Client was now in a better position to make his mind whether he should instantly move his application to PHP 7 or upgrade it later. vteams evaluated all the Pros and Cons of upgrading an application to PHP 7. You should also consult an expert engineer to evaluate your application before deciding when to upgrade to PHP 7.