Source: medium.com

What’s new in PHP 8 !

Category: PHP

It’s a new major version, which means that it will introduce some breaking changes, as well as lots of new features and performance improvements.

Because of the breaking changes, there’s a higher chance you’ll need to make some changes in your code to get it running on PHP 8.

Starting with new features, remember that PHP 8 is still in active development, so this list will grow over time.

Whenever you wanted to catch an exception before PHP 8, you had to store it in a variable, regardless whether you used that variable or not.

If you’d write something like this: PHP would previously interpret it like this: PHP 8 will make it so that it’s interpreted like this: Before PHP 8, it was possible to apply arithmetic or bitwise operators on arrays, resources or objects.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners