Enums or enumerations are a new feature introduced in PHP 8.1 that contains a defined number of possible values you can use. When creating an app, you often come across scenarios where you have a predetermined list of options to select from, for instance:

A blog entry can be published, in the draft, or in review.
A player may be a medic, soldier, engineer, 
A ticket may be VIP, standing, or seated, 
and so on …

Top
Generated by Feedzy