Answers for "enum in php"

PHP
0

enum in php

abstract class DaysOfWeek
{
    const Sunday = 0;
    const Monday = 1;
    // etc.
}

$today = DaysOfWeek::Sunday;
Posted by: Guest on April-17-2021

Browse Popular Code Answers by Language