Wow. This is a really old topic. The WTF of using resources over a decade
old. I wonder if Joel has the same opinion a decade later. Really it
doesn't matter what their opinions are.
Exceptions are essentially just taking the return status out of the manual
implementation and putting it into the language. So instead of returning
some status code that the programmer has to manually lookup and take some
action. You create an exception and throw that, which returns the exception
from the function. The advantage is that you can use additional language
features to provide a single place for cleanup.
Now technically, if you are talking about Java or C++, you are looking at
traps and lower level instructions when throwing exceptions, but I doubt
PHP works that way. Exceptions are just prettier status codes. Anyone who
tells you otherwise doesn't know what they are talking about or being
pedantic, but you can safely ignore this person as they lack the
imagination to understand what exceptions are actually doing.