PHP Classes

3 PHP 8.3 New Features Implemented Before Feature Freeze

Recommend this page to a friend!
  Blog PHP Classes blog   RSS 1.0 feed RSS 2.0 feed   Blog 3 PHP 8.3 New Feature...   Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)  

Author:

Updated on: 2023-08-15

Posted on: 2023-07-07

Viewers: 1,076 (July 2023)

Categories: PHP community, News

PHP 8.3 is expected to be released around November and December of 2023.

The feature freeze date is coming on July 18, 2023. After that date, adding more new features to PHP 8.3 will not be allowed.

Therefore several proponents of new PHP 8.3 features that were voted accepted have finally added the code to implement those features.

There will be a few months to test these features before the final PHP 8.3.0 release.

Read this article to learn what those features just implemented for PHP 8.3, so you know what you can expect when the final PHP 8.3.0 is released.




Loaded Article

In this this article you may learn below about the last PHP 8.3.0 Features:

1. Improved unserialize() error handling

2. New Function mb_str_pad

3. Define proper semantics for range() function

4. Other New Features of PHP 8.3


PHP 8.3

This image above is based on PHP 8 logo design by Vincent Pointier.

The last PHP 8.3.0 Features

1. Improved unserialize() error handling

This improvement will make PHP throw exceptions when there are errors parsing strings that contain serialized variable values.

Before this improvement, PHP would issue notices and warnings. Developers could detect these warnings and messages using a custom PHP error handler.

You can learn more about this improvement in respective RFC (Request For Change) document.

2. New Function mb_str_pad

This is an alternative function to the PHP str_pad function. The str_pad function can add one string before or after another string.

The new mb_str_pad function does the same but supports better strings using multi-byte encodings like UTF-8, which is used in written languages with characters that need more than 8 bits to represent all characters, such as Asian languages.

You can learn more about this new function in the respective RFC (Request For Change) document.

3. Define proper semantics for range() function

The PHP range function is useful to generate arrays of values that follow a certain sequence by passing the range's first and last element and an optional step value.

When you pass invalid values to these steps, older PHP versions are used to emit warnings, and the invalid values may go unnoticed by the developer that wrote the code that uses the range function.

This improvement will make PHP throw exceptions. This change will help developers detect bugs in their code that make it pass invalid values to the range function.

You can learn more about this new function in the respective RFC (Request For Change) document.

4. Other New Features of PHP 8.3

PHP 8.3 will have other new features that are already implemented. You may read more about those new features in this article about PHP 8.3 New Features that You Will Want to Use After PHP 8.3 Release Date.




You need to be a registered user or login to post a comment

Login Immediately with your account on:



Comments:

No comments were submitted yet.



  Blog PHP Classes blog   RSS 1.0 feed RSS 2.0 feed   Blog 3 PHP 8.3 New Feature...   Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)