PHP 7 and the improvements to PHP 5

by / Wednesday, 24 February 2016 / Published in Blog
PHP

PHP is a website programming language. It’s the World Wide Web’s most popular code, estimated to power over 80% of websites, including the likes of Facebook and Wikipedia. In December 2015, a major new version of PHP was released: PHP 7.

PHP 7 is the first major upgrade to the language for more than decade. The main improvement is speed. PHP 7 is estimated to be around twice as quick as the previous version. It’s also more memory efficient, using as little as half the amount of memory as before. There are also other benefits that programmers can use to enhance websites.

However, there’s one major reason not to rush your website onto this latest version of PHP. Compatibility with some older aspects of the PHP code has been dropped, so if you have some legacy code on your website when you upgrade to PHP7, then your website could break.

The latest versions of the most popular website content management systems, WordPress and Drupal, are both PHP 7 compatible.  The danger will be from additional code used on these sites, such as bespoke functionality or modules/plugins.

However, it’s still worth checking out which version of PHP your website is running on.  Several improvements have been made to PHP 5 (the predecessor to PHP 7) over the last few years and these have significantly increased performance. For example, since PHP 5.5, a new caching technology called OPcache comes built into the code. Simply turning this on will speed up a PHP website, with an estimated 14% reduction in response times.

Also, if your site is running on a particularly old version of PHP, there can be security risks. This is another reason to upgrade to a later version.

Some developers prefer other languages to PHP. Application frameworks like ‘Ruby on Rails’ have gained popularity over the last few years, while other websites use the traditional rival to PHP, the Microsoft .Net programming environment.

However, PHP is in a strong position going forward. Not only is the language continually improving, it’s also well established.  From the commercial angle it’s cost effective: the software is free, and it’s easier to find people with PHP skills than any of the alternatives.

Leave a Reply

TOP