An early look at PHP 9.0's new features and changes
Table of contents:
When will PHP 9.0 be released?
How to install and test PHP 9.0?
- New features and changes planned for PHP 9.0
PHP is an open-source project. Knowing what new features and changes are planned for the next version only takes a minute of research. For instance, this page lists all the accepted RFCs for different versions of PHP.
That being said, despite PHP 9.0 being planned, no work have been started yet and we have to dig deeper.
For now, the release date of PHP 9.0 hasn’t been announced yet. This version is still far in the future. We could get PHP 8.5 and 8.6 before 9.0 is even considered. Who knows?
To this day, no work has been started on PHP 9.0, so you won’t even be able to pull the latest code and compile it yourself.
Features that have been deprecated in PHP 8.1, 8.2, 8.3, and 8.4 (learn more about PHP 8.4) will finally removed in PHP 9.0. This will translate to breaking changes for developers who ignored the warnings. 😅
Here’s a list of RFCs containing all the deprecated features:
- PHP RFC: Deprecations for PHP 8.1
- PHP RFC: Deprecations for PHP 8.2
- PHP RFC: Deprecations for PHP 8.3
- PHP RFC: Deprecations for PHP 8.4
In order to make PHP more reliable, warnings for undefined variables and properties will now become errors.
For instance, the following code will not run anymore in PHP 9.0:
// PHP 8.x: "Warning: Undefined variable $foo"// PHP 9.0: "Fatal error: Uncaught Error: Undefined variable '$foo'"echo $foo;
Also, from what I understand, these changes with variables and properties will make the maintainers’ lives easier, which is good for everyone!
I let you check out the RFCs for more details: