Facebook Pixel

PHP 7.1 Now available on Shared & Premium Hosting Servers




Posted on January 18th, 2017 by Barnaby Puttick


PHP 7.1 is the new minor release of PHP, which we now support on the majority of our Shared Hosting and all of our Premium Hosting Servers along side 7.0 and the default 5.6 version.

New Features Include:

  • Iterable pseudo type
  • Closure from callable
  • Square bracket syntax for list()
  • Support for keys in list
  • Class constant visibility
  • Nullable types
  • Void functions
  • Catching Multiple Exception Types
  • Too few arguments exception

 

Please visit the official PHP 7 Documentation for more information on all the new features and changes.

How does PHP 7 boost your website’s speed?

PHP 7 achieves an enormous increase in speed through improvements to the Zend Engine, opcode caching as well as an improved data structure, which reduces memory requirements and ensures more efficient memory management.

Usually, PHP scripts are compiled at runtime. In this process, part of the computing time is needed to convert the code. With OpCache, this calculation is only performed once, and the pre-compiled, machine-readable (calculated) script is saved in a cache. The script can be loaded from this cache at lightning speed as needed. In most cases, this significantly improves the speed.

Large websites in particular can handle a considerably larger number of requests at the same time when OpCache is enabled—this is especially important for company websites and e-commerce.

Using PHP 7 on your hosting

By default, your hosting will use PHP 5.6, if you wish to switch to use PHP 7 this can simply be done by adding a line to your .htaccess file in the document root of your site.

SetEnvIf HOST . PHP_VER=71

Please note there is no decimal place used, so use 56, 70 and 71 for 5.6, 7.0 and 7.1 respectively.

PHP 7 is generally very compatible with older PHP versions. Nevertheless, we recommend testing websites, plugins and scripts with PHP 7 before employing PHP 7 in live systems.

Facebooktwittergoogle_plusredditpinterestlinkedinmail


Leave a Reply

Your email address will not be published. Required fields are marked *