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
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.