After examining the syntax of construction try{...}catch(Exception $e){...}, and learning about the opportunity to create your own exception classes by inheriting them from Exception class and realizing the power of mechanism you have, you could follow either of two ways:

Debugging PHP scripts is definitely not enough described in the Internet. That is why a great amount of people are content with print_r. The obvious drawback of this method is impossibility to debug AJAX, SOAP services, image generators, and generally scripts not giving HTML documents directly.

Today I'll show how to find a geographic position of a photograph in PHP. Then we write a simple script with which we extract the photograph geo position from metadata.