Exceptions in PHP (and similar OOP languages) can be caught using interfaces rather than specific class names or parent classes. This enables polymorphic exception handling, allowing the same exception to be caught in multiple ways. Targeting interfaces gives developers more flexibility when different exception types share common behavior through a shared interface.
Sort: