PHP 8.3 is set to be released on November 23, 2023. The following are the innovations and changes that PHP 8.3 will bring - each with links to further information.
Now you can define a data type for a class constant with typed class constants. This makes your code more secure and cleaner.
json_validate
FunctionThe json_validate
function is a novelty that allows validating a JSON string and receiving helpful and accurate error messages in the process.
The support for dynamic class constants and enum member fetching gives you more flexibility and dynamism in programming.
gc_status()
The gc_status()
function now provides additional information about the garbage collection. A useful tool to optimize your memory usage.
Random
ExtensionThe Random
extension receives two new methods: \Random\Randomizer::getBytesFromString
for generating bytes from a string and \Random\Randomizer::getFloat()
as well as nextFloat()
to generate random floating-point numbers.
There is now fallback value support for PHP INI environment variable syntax to define a substitute value if the environment variable is not set.
The php -l
command now allows checking multiple files at once, which accelerates your workflow.
class_alias()
The class_alias()
function now supports aliases for built-in PHP classes. This allows you to interact better with these classes.