Which programming language is this?
enum Suit: string
{
case Hearts = 'H';
case Spades = 'S';
}
echo Suit::from('H')->name;
Answer: PHP
A backed
Play Programming Languages ▸
enum Suit: string with case entries and the Suit::from() static call are PHP 8.1.