You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
enum SituationType : int
{
case Unknown = 0;
case SecurityAlert = 1;
case EmergencyServicesCall = 2;
case PoliceActivity = 3;
case PoliceOrder = 4;
case Fire = 5;
case CableFire = 6;
//...
}
SituationType::CableFire->name; // "CableFire"
SituationType::CableFire->value; // 6foreach (Status::cases() as$case) {
echo"name {$case->name}, value {$case->value}\n";
}
this might be worth looking into? php 8.0 is already eol
The text was updated successfully, but these errors were encountered:
PHP 8.1 added native enums, so instead of having
it's now possible to do
this might be worth looking into? php 8.0 is already eol
The text was updated successfully, but these errors were encountered: