← All writing
PHP23 Nov 20234 min read

PHP 8.3: typed class constants and JSON validation without hacks

Mark Topper
Mark Topper
Founder · Ulties
PHP 8.3: typed class constants and JSON validation without hacks

Released on 23 November 2023, PHP 8.3 refined the type system and filled in several long-standing quality-of-life gaps.

PHP 8.3 is a classic tightening release. It does not try to redefine the language, but it closes awkward gaps that teams kept working around in userland.

The most visible additions are typed class constants, dynamic class constant fetch syntax, readonly amendments, the `#[\Override]` attribute, `json_validate()`, and extra power in the randomizer API. Each one trims a little uncertainty out of real codebases.

That is why 8.3 feels bigger than its changelog suggests. Better contracts at the class level and a cheap way to validate JSON input both land directly in the daily path of framework, API, and package development.

Share
XLinkedIn
Read next

What a good software project brief actually needs

Marketing