Easy way to debug PHP script

If you can’t catch error in PHP script but something doesn’t work – add this to the beginning of your script:

ini_set('display_errors',1);
error_reporting(E_ALL);

this will allow you to see all errors.