blog

What to Expect from the Next Major Release PHP 9.0

Share:

PHP continues to evolve as an open-source, community-driven language, with improvements shaped through RFCs (Request for Comments). While PHP 9.0 is still in the early planning phase, development has not yet begun. Here’s a look at what we can expect in this upcoming release.

πŸ“… PHP 9.0 Release Date. Currently, there is no official release date for PHP 9.0. Before its arrival, we are likely to see incremental updates such as PHP 8.5 and PHP 8.6.

πŸ”§Installing and Testing PHP 9.0. Since development has not yet started, PHP 9.0 is not available for download or testing at this time.

Expected Features and Changes in PHP 9.0 πŸš€

1. Improved Increment and Decrement Behavior

PHP 9.0 will refine how the ++ and -- operators behave, introducing the following changes:

  • Elimination of Odd String Increments ❌
  • Boolean and Null Treated as Numbers βœ…
  • Empty Strings No Longer Convert to Numbers πŸ›‘

For those who need the previous string increment behavior, PHP 9.0 introduces a new str_increment() function.

2. Exception Handling for Unserialization Errors ⚠️

PHP 9.0 enhances error handling for unserialize(), moving from warnings to exceptions:

  • PHP 8.3: Warning: unserialize(): Error at offset 0 of 3 bytes
  • PHP 9.0: Uncaught UnserializationFailedException: unserialize(): Error at offset 0 of 3 bytes

This update allows developers to handle errors more consistently without custom error handlers.

3. Streamlined Function Signatures ✍️

Function signatures will be refined to improve clarity and usability.

  • Example with array_keys()
  • Example with DatePeriod::__construct()
4. Stricter Array Creation Rules πŸ—οΈ

PHP 9.0 will restrict implicit array creation from scalar values:

  • Current behavior:
  • New behavior:

This change prevents unintended bugs caused by automatic array creation.

5. Simplified String Interpolation 🎭

String interpolation rules will be streamlined, eliminating ambiguous methods:

  • Deprecated in PHP 9.0:
  • Recommended alternatives:
6. Transition from Warnings to Errors ❗

Warnings for undefined variables and properties will become fatal errors:

  • Current (PHP 8.x):
  • PHP 9.0:

This change ensures more reliable code execution.

7. Removal of Deprecated Features πŸ—‘οΈ

PHP 9.0 will remove features deprecated in PHP 8.1–8.4. Developers should review the relevant RFCs to ensure compatibility:

πŸ’­ PHP 9.0 aims to enhance consistency, predictability, and performance. While its release date remains uncertain, developers should start preparing by keeping up with RFC discussions and adjusting their code to align with future best practices.

If you have any questions about your project, please write to us.

We are happy to help🀝

Related articles

Circle icon
Circle icon
Circle icon
Circle icon
Circle icon
Circle icon
Circle icon
Circle icon
Circle icon
Circle icon
Circle icon
Circle icon

get in touch

EVEN IF YOU DON'T YET KNOW WHERE TO START WITH YOUR PROJECT - THIS IS THE PLACE

Drop us a few lines and we'll get back to you within one business day.

Thank you for your inquiry! Someone from our team will contact you shortly.
Where from have you heard about us?
Clutch
GoodFirms
Crunchbase
Googlesearch
LinkedIn
Facebook
Your option
I have read and accepted the Terms & Conditions and Privacy Policy
bracket icon
bracket icon
bracket icon
bracket icon
bracket icon
bracket icon
slash icon
slash icon
slash icon
slash icon
slash icon
slash icon
bracket icon
bracket icon
bracket icon
bracket icon
bracket icon
bracket icon