PHP 8.2 became available today.

development Software
PHP 8.2 became available today

Today PHP 8.2 became generally available. The new major PHP release was slightly delayed compared to previous versions. Earlier the new versions were released mainly at the end of November, such as 8.1 (23rd of November 2021), 8.0 (24th of November 2020), and 7.4 (26th of November 2019). This year the release happened in the second week of December.


The new version contains numerous changes to make the coding process simpler. Some of the features long-awaited by developers were added to this release. The update includes such features as:

  • Ability to declare constants in traits. This is particularly helpful, because traits allowed developers to re-use parts of code.
  • New readonly classes - a feature that was added in 8.1 but now expanded further. Now the whole class can be declared as readonly. This feature doesn’t 

work for dynamic properties, though. 

  • Ability to use true, false and null as standalone types, making the PHP type system more descriptive;
  • A new attribute called SensitiveParameter. It protects sensitive information and prevents it from being logged or displayed if an application crashes.

Also, some features, available in earlier versions of the language, became deprecated, such as partially-supported callables,  ${var} string interpolation, mbstring extension with some encodings (BASE64, UUENCODE, HTML-ENTITIES and its alias html, Quoted-Printable and its alias qprint), and #utf8_encode() and utf8_decode() functions. This may cause some issues for the projects that will be updated from the much older versions of PHP, so it is highly recommended to create a backup before the update.


Image Credit: Photo by Mylon Ollila on Unsplash