David Carrdcblogdev.hashnode.devยทMay 3, 2024PHP use an enum for FiltersI have a class that allows filtering based on an option, I need a way to accept options and also reject invalid options. In the past, I would reach for a switch statement, or more recently a match statement. But an enum is better suited for this task...69 readsFilterAdd a thoughtful commentNo comments yetBe the first to start the conversation.