Turn on PHP Error at Runtime

Sometimes when working with PHP , it is convenient to enable error temporarily on one particular page  to troubleshoot an issue.
If you want to enable error for just one page at runtime, use one of the followings.

<?php
// report all error on that page
error_reporting(E_ALL);
...
?>

or

<?php
// Report all PHP errors
error_reporting(-1);
...
?>

or

<?php
// Same as _reporting(E_ALL);
ini_set('error_reporting', E_ALL);
...
?>

When you are done fixing the issue, you can just remove it.

Reference
http://www.php.net/manual/en/function.error-reporting.php