❤️ AZDIGI has officially updated to a new blog system. However, some posts may have incorrect or mismatched images. Please click the Report article button at the bottom of the post so AZDIGI can update as quickly as possible. Thank you!

PHP 7.4 is scheduled to be released on November 28, 2019. However, at this time, PHP has announced and leaked some information about the update. PHP 7.4 will introduce many new features, syntax additions, and bug fixes from previous versions, particularly the powerful enhancement of the OPcache Preload feature.

Let’s explore the new points and changes in this version with AZDIGI!

You can download the Beta version here to experience it before the official release.

Currently, customers using AZDIGI’s SSD Hosting service can also use PHP 7.4 through the PHP version option in cPanel.

1. Some features and changes in PHP 7.4

Here are some basic features integrated into PHP 7.4:

  • Support for Typed Properties: PHP 7.4 allows you to easily declare type hints for variables and class properties without the need to create getter and setter methods to enforce type contracts.
  • Support for Arrow Functions: Similar to common anonymous function syntax in JavaScript, PHP now allows you to declare functions in the form of Arrow Functions to shorten the code when creating functions.
  • Integration of the Spread Operator feature: Although PHP has supported the Spread Operator since PHP 5.6, in PHP 7.4, this feature is now available for array-type data to merge array data (which is faster than using the array_merge() function) to improve PHP performance.

2. Powerful improvements of OPcache Preload in PHP 7.4

As emphasized, alongside new features and some syntax changes, PHP 7.4 stands out with significant enhancements from the Opcache Preload feature.

  • Opcache takes the compiled PHP source files and stores them in memory for reuse, thus avoiding repetitive compilation cycles.
  • However, maintaining this cache in memory requires Opcache to constantly monitor the files and recompile them. This can be a waste of time for files that do not change but you still want them to be cached continuously or permanently.
  • With the Opcache Preload feature in PHP 7.4, you can configure one or a set of files to be always cached when PHP starts, as well as inform PHP that these files will never change, ensuring they always have cache when processed.

Currently, AZDIGI has a detailed article on How to Use Opcache Preload in PHP 7.4 on WordPress, which you can refer to for more information about this feature.

Currently, AZDIGI has a promotion program with discounts of up to 40% applied until November 26, 2019. In addition, customers with invoices over 500,000 VNĐ will have the opportunity to participate in a lucky draw with a special prize of an iPhone 11 Pro.

Stay tuned for more details about our promotion program here.

 

Share:
This article has been reviewed by AZDIGI Team

About the author

Thạch Phạm

Thạch Phạm

Đồng sáng lập và Giám đốc điều hành của AZDIGI. Có hơn 15 năm kinh nghiệm trong phổ biến kiến thức liên quan đến WordPress tại thachpham.com, phát triển website và phát triển hệ thống.

10+ years serving 80,000+ customers

Start your web project with AZDIGI