I'm fairly new to PHP programming and I've been trying to understand how to work with exceptions in PHP. I've come across the concept of creating custom exception hierarchies or applying inheritance to exceptions. However, I'm not exactly sure if it's possible to do this in PHP.
Basically, what I want to know is whether I can define my own exception classes, which inherit from the base `Exception` class provided by PHP. If so, how can I go about doing this? Can someone please guide me on how to define and use custom exception hierarchy or inheritance in PHP?
Any help or examples would be greatly appreciated. Thank you!