PHP team recently announced that PHP 8 would be released on 26 November, 2020. This is currently active in the development, and we can expect the first release of alpha in June 2020. Nevertheless, It will take more than four months to build the latest version of PHP beta 8.0.0, but now you can focus on the upcoming features of the PHP beta 8.
You need to change many things to get updated with the latest release of PHP beta 8. From now, If you start upgrading the key objective, Path then later updation will not become hard for you. As you know, The PHP Beta 8 is coming then In this post; we will share all the latest features to you.
What are the new features of PHP Beta 8?
PHP team will expand the new version with the great features. That will mainly be focused on the Object-oriented design, Match expression, Construction Property, and many more things.
- NullSafe Operator – If you know the null coalescing operator, then you are already familiar with this. This doesn’t work with the method calls, but you need to do intermediate checks.
- Union types support – Union types are the collection of one or more types, which means either one of them can be used for a purpose.
- Promotion of Constructor Property – In this new feature, Instead of specifying the particular class property and a constructor, we can simply combine them into one. We can define and assign the properties during the creation of the object.
- Match expression – This expression is similar to the Switch operator. You don’t need to use the Break keyword in it, and also you can combine the conditions in new features of PHP.
- New Static Return type – This is one of the great features, As we can have static return type.
- Named Arguments – This will allow you to pass in values to a function. By using this, you can specify the value name and also skip the optional parameters.
- New Throw Expression – This feature will use to throw an exception in another place as well.
- Stringable Interface – This interface is used to type hints or many thing that is string which implements __toString(). We don’t need to create it manually; it will automatically implement the interface.
Checkout Latest News – WordPress Cancels All It’s In-Person Flagship Events till 2022!
Other Highlighted features
- New str_contains() Function
- New get_resource_id() function
- Object implementation of the token_get_all() method and many more.
When will it release?
PHP team has released the schedule of when each version will be released. On November 26, we are supposed to get the latest version of it. Below you can take a look at it.
So this is the all-new information we have. If we get more updates, then we will let you know for sure!