PHP 8.1 Feature Work Includes Adding Enums, Fsync Function
Written by Michael Larabel in Programming on 4 April 2021 at 06:06 AM EDT. 10 Comments
PROGRAMMING --
While most haven't even moved to PHP 8.0 yet in their Linux distribution default packages let alone in production environments, PHP 8.1 is under development and like clockwork should be out around the end of November as usual for their yearly release dance. In two months already the PHP 8.1 alpha releases should start up.

In two months it's already time for the PHP 8.1 alpha releases to begin. The PHP 8.1 schedule is like most years and after the three bi-weekly alpha releases it puts the PHP 8.1 feature freeze towards the end of July before moving onto the beta releases and then the many release candidates. If all goes well, PHP 8.1.0 will be out on 25 November.

As for what's coming down the pipe with PHP 8.1, the items on the table so far that have already been merged or safely assumed for this next annual update include:

- Enums are set to be introduced. Yes, PHP is finally introducing enumerations to the language. Details on the addition can be found via this RFC.

- PHP 8.1 is introducing an fsync() function to help ensure the operating system has written out data changes (and metdata) to the underlying storage. There is also a new fdatasync() function focused just on syncing data but not the metadata -- or the same behavior as fsync() when on Windows / non-POSIX environments.

- The seemingly never-ending work on performance improvements for PHP will continue with more optimizations expected this cycle. One of the particulars so far is the PHP 8.1 opcache has added an inheritance cache. This should help reduce the overhead of PHP class inheritance.

- Adding support for "Fibers" to improve the asynchronous support in PHP. The changes allow PHP functions to now be interruptible without polluting the call stack and for supporting transparent non-blocking I/O implementations of existing interfaces. Details on this big change via this RFC.

- The PHP 8.1 hashing code adds xxHash and MurmurHash V3 support.

- Continued PHP8 work on transitioning more resources to objects. For PHP 8.1 the resources for fileinfo, GD, FTP, IMAP, LDAP, and other code should be transitioned to objects.

Stay tuned for more details on the PHP 8.1 feature work followed by PHP 8.1 benchmarks as we move closer to the November release date.
Related News
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Popular News This Week