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

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners