PHP 8.3 Released With Typed Class Constants & Override Attribute

PHP 8 3 Released as the latest major annual update to the PHP programming language.

PhPPHP 8.3 implements a number of new language features and other improvements for this widely-used programming language. In my benchmarking of PHP 8.3 over the past few days I haven’t noticed any major performance changes in either direction compared to PHP 8.2. Among the new features of PHP 8.3 are:

dev terminal 3
  • Class constants can now be accessed dynamically with a new syntax addition.
  • Implementing more appropriate date/time exceptions.
  • Adding a json_validate() function for validating JSON.
  • Implementing the #[\Override] attribute RFC to check that a method exists in a parent class or implemented interface.
  • Updating the Zip extension and adding new set/get archive flag methods.
  • The PHP POSIX support added posix_sysconf, posix_pathconf, posix_fpathconf, and posix_eaccess functions.
  • A number of new PHP Sockets options.
  • New features for the Randomizer class.
  • Adding support for newer cURL options and constants up through cURL 7.87.
  • Various new DOM methods added for DOM nodes and elements.
  • Support for rounding negative places within the number_format() function.
  • Support for zend_call_stack_get on OpenBSD platforms.
  • Support for linting multiple files at once using the php -l option.
  • Support for negative indices in arrays.
  • Support for anonymous read-only classes.
  • Support for typed class constants with class, interface, trait, and enum constants now supporting type declarations.
  • Closures created from magic methods can now accept named arguments.
  • The PHP CLI now supports linting multiple files.
  • Implementing the STREAM_NOTIFY_COMPLETED notification for PHP streams.
  • Many bug fixes and other improvements.

Downloads and more details on today’s PHP 8.3 release via PHP.net.

PhpStorm

PhpStorm provides full support for all of the improvements in PHP 8.3. Read this blog post to find out more

Which PHP Version Does WordPress Support?

The latest WordPress, version 6.4, requires PHP 7.4 or newer. PHP 8.0 and 8.1 are supported with some exceptions, and support for PHP 8.2 and 8.3 are currently in beta stage. It is therefore not recommended to upgrade to the latest PHP version immediately upon release, as the WordPress core and plugins will only start supporting newer PHP versions as they are updated by their developers.

Source: Phoronix PHP 8.3 PHP Programming Language

Tagged , , , . Bookmark the permalink.

About Abu Hamza

Abu Hamza is member of Business Bee Staff

Comments are closed.