PHP 8.3 alpha release is now available, offering a glimpse into the upcoming version’s new features, functions, classes, constants, performance improvements, and deprecated functions.
PHP 8.3.0
PHP 8.3.0 is scheduled for release on November 23, 2023, and here are some of the major changes that you should be aware of:
Changes in PHP 8.3
- mysqli_fetch_object now raises a ValueError instead of an exception when the constructor_args argument is non-empty with the class not having a constructor.
- mysqli_poll now raises a ValueError when the read nor error arguments are passed.
- unserialize() now emits a new E_WARNING if the input contains unconsumed bytes.
- strtok() raises a warning in the case token is not provided when starting tokenization.
- password_hash() will now chain the underlying Random\RandomException as the ValueError鈥檚 $previous Exception when salt generation fails.
- proc_open() $command array must now have at least one non-empty element.
- array_sum() and array_product() now warn when values in the array cannot be converted to int/float. 聽Previously arrays and objects were ignored while other values were cast to int
- array_pad() is now only limited by the maximum number of elements an array can have. Previously, it was limited to adding at most 1048576 elements at a time.
- proc_open() $command array must now have at least one non-empty element.
- Made opcache.preload_user always optional in the cli and phpdbg SAPIs
- mb_detect_encoding has improved the ability to identify UTF-8 and UTF-16 strings with a byte-order mark.
New functions in 8.3
- json_validate() function that checks whether the given JSON is valid for the specified $depth and $options has been added
- posix_sysconf call to get runtime informations has been added
Deprecated Function
- The U_MULTIPLE_DECIMAL_SEPARATORS constant has been deprecated. It is recommended to use the U_MULTIPLE_DECIMAL_SEPARATORS constant instead
Learn more a bout PHP 8.3.
Leave a Reply Cancel reply