Modern PHP features explained – PHP 8.0 and 8.1 (Laravel News)

Post Syndicated from original https://lwn.net/Articles/912725/

This
Laravel News article
digs into the many enhancements that have found
their way into the PHP language in the last couple of years or so.

Lovely Enums, the savior of pointless database tables and floating
constants across the codebases of the world. Enums have quickly
become one of my favorite features of PHP 8.1 – I can now push my
roles into Enums instead of keeping them in a table that never
changes.