note 126857 deleted from language.types.enumerations by crell
| From: | crell@php.net | Date: | Wed, 16 Feb 2022 16:59:49 +0000 |
| Subject: | note 126857 deleted from language.types.enumerations by crell | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-217624@lists.php.net to get a copy of this message | ||
Note Submitter: den4ic2001 at gmail dot com
----
// You can explicitly specify a scalar type
enum Color: string {
case Red = "#fc0505";
case Black = "B";
case White = "W";
}
print Color::Red->name; // retirn string âRedâ
print Color::Red->value; //retirn string âRâ