PHP 8.3: What's New and Changed
New Features in PHP 8.3
- Typed Class Constants
- Added
json_validatefunction - Dynamic class constant and Enum member fetch support
- New
mb_str_padfunction - New
#[\Override]attribute - New
stream_context_set_optionsfunction class_alias()supports aliasing built-in PHP classes- PHP CLI Lint (
php -l) supports linting multiple files at once - Fallback value support for PHP INI Environment Variable syntax
Randomextension: New\Random\Randomizer::getFloat()andnextFloat()methodsRandomextension: New\Random\Randomizer::getBytesFromStringmethodgc_status()returns additional GC information
Syntax/Functionality Changes in PHP 8.3
- SQLite3: New
\SQLite3Exception, deprecations, and changes - Built-in CLI Server
$_SERVER['SERVER_SOFTWARE']value changed for RFC3875 compliance - Class constant type declarations in some PHP extension classes
- Granular
DateTimeExceptions highlight_fileandhighlight_stringoutput HTML changesunserialize(): UpgradeE_NOTICEerrors toE_WARNING