1. Go to this page and download the library: Download dive-be/php-enum-utils library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dive-be / php-enum-utils example snippets
enum Role: string
{
use \Dive\Enum\Arrayable;
use \Dive\Enum\Assertable;
use \Dive\Enum\Comparable;
use \Dive\Enum\NameListable;
use \Dive\Enum\ValueListable;
case Administrator = 'admin';
case Auditor = 'audit';
case Moderator = 'mod';
}