Return to homepage

PHP Enums

7 episodes
31 mins

About this course

Enums represent a typed set of possible values in PHP. For example, if you're storing a Book that can have a status of want to read, reading or read, an Enum will hold these values in one place that you can reference anywhere.

Prior to PHP 8.1 (when Enums were added), you'd have to work with a simple class with constants. While that works fine, it doesn't provide much power under the hood.

In this course, we'll look at the power of Enums and how they can drastically simplify your code.

Your teacher

Alex Garrett-Smith
Alex Garrett-Smith

Hey, I'm the founder of Codecourse!

Related content

You might also enjoy these

Enums in Laravel

9 episodes
31 mins
Want to stay in the loop about new content?
Of course you do.

© 2023 Codecourse Ltd. All Rights Reserved. Born in the UK.