Any software upgrade can be nerve-wracking, as the various aspects of compatibility, feature availability, and potential downtime are weighed. As software ages, it becomes less supported; eventually, support for a given version is phased out completely. PHP, the language used by Drupal, is not immune to this, and upgrades to it should be planned accordingly.
When you're preparing to upgrade from one version of PHP to another, start with the PHP incompatibilities pages.
If you've checked these pages, and aren't completely sure you're compatible, or you'd prefer another check, you can use http://pear.php.net/package/PHP_CodeSniffer/. The Nerdery wrote an article detailing its usage: Is my code compatible with PHP 5.4 or 5.5?, as well as a list of suggestions on how to test version compatibility.
PHP CodeSniffer can provide you with a detailed list of issues that should be checked. It should give you a good place to start working on module and theme upgrades. PHPlint is another useful code checking tool. Finally, for migrations from PHP 5.6 to PHP 7, try the PHP 7 Migration Assistant Report.