The PHP 8 Beta is Here
Published on by Paul Redmond
The PHP team announced the release of the first PHP 8 beta yesterday! We are still about four months from the v8.0.0, but you can start preparing for PHP 8 by learning about the new features, the upgrade path, and key dates to make sure you’re ready.
What New Features are in PHP 8?
PHP 8 expands on the language with new features focusing on the language’s object-oriented design, types, and adding missing conveniences. Here are some of the highlight features coming to PHP 8:
- Union types support
- Define Named arguments in function and method calls
- Nullsafe operator support to safely call methods on potentially null values
- The Match Expression
- Constructor property promotion to reduce boilerplate around defining and assigning properties during an object’s construction
- Changing the throw statement into a throw expression
- A new Stringable interface for classes that implement
__toString()
- Support for static return type
Check out the upgrading document for the complete list of new features.
Timeline
This release kicks off the feature freeze portion of the PHP 8 release cycle. We’ll see a few more betas, five release candidates, and finally the general availability release on November 26, 2020:
Learn More
The following list of resources has everything you need to learn more about the upcoming releases:
- The UPGRADING document includes backward-incompatible changes, new features, and everything else you’ll need to familiarize yourself with changes in PHP 8.
- THh NEWS document has detailed notes about each release
- The PHP 8.0 preparation tasks page has the release timeline of the upcoming beta and release candidate (RC) releases
- You can download the PHP 8.0.0beta1 source from the downloads page