Is PHP 7.4 worth it?

Is PHP 7.4 worth it?

Is PHP 7.4 worth it?

  • 2 years ago
  • postat de: NSHOST

Considering the decisive 79% of preferred language when it comes to server-side programming, we can all agree that PHP matters and that PHP version counts even more. Starting with PHP 7 web platforms are using less memory with its twice faster in server response time than its prior versions. 

PHP 7.4 is tuned for even higher performance than ever before, making most of  typed properties and arrow functions to help developers write cleaner code, while OPCache preloading that allows your server to keep your php files cached in memory that promises to boost your website’s overall performance between 2 and 15 times. It is worth mentioning that preloading doesn’t remove other execution costs like source files changes, dependencies between stored classes in different files i.e. 

On server startup - before any application code is run - PHP can load a certain set of PHP files into memory and make their contents permanently available to all subsequent requests.

We were curious to compare applications performance on 7.4 against the former champion 7.3 version. We were amazed to find out that without any code change,  a Symfony PHP web application immediately improved 19% in performance measured with the Lighthouse audit. It is worth mentioning also that 7.3 upgrade to 7.4 did not break our platform either. Of course, if you wish to upgrade from an older version of PHP, you need to fix specific deprecations.

And if website loading speed improvement didn’t convince you yet, think about security during these periods when hacking grew and GDPR fines are around the corner waiting for a data breach. Security is impacted as older PHP version reaches their ‘end of life’, when support is removed and code gets older and older.  

With all NHOST shared, VPS or cloud hosting plans , you can easily switch your PHP on different domains or subdomains between multiple versions, starting with 5.4 up to this amazing 7.4 latest stable version, supporting cleaner coding, faster loading and overall secure websites.