'How to get Enum values Array in PHP
I have Enum Class.
<?php
namespace Enum;
enum Status:string
{
case ACTIVE = 'active';
case ARCHIVE = 'archive';
case INACTIVE = 'inactive';
}
I'd like to retrieve values as array like this. ['active', 'archive', 'inactive'].
Can anyone please help me how I can get this?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
