1--TEST-- 2String backed enums can list cases 3--FILE-- 4<?php 5 6enum Suit: string { 7 case Hearts = 'H'; 8 case Diamonds = 'D'; 9 case Clubs = 'C'; 10 case Spades = 'S'; 11} 12 13var_dump(Suit::cases()); 14 15?> 16--EXPECT-- 17array(4) { 18 [0]=> 19 enum(Suit::Hearts) 20 [1]=> 21 enum(Suit::Diamonds) 22 [2]=> 23 enum(Suit::Clubs) 24 [3]=> 25 enum(Suit::Spades) 26} 27