PHP 8.3 Released With Typed Class Constants & Override Attribute

PHP 8.3 is out today as the latest major annual update to the PHP programming language.

PHP 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:

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