How can error reporting be utilized in PHP to troubleshoot issues like a blank page output?

When encountering a blank page output in PHP, it is often due to a fatal error or an issue with the script execution. To troubleshoot this, error reporting can be enabled to display any errors that occur during the script execution. This can help identify the specific issue causing the blank page output.

<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);

// Your PHP code here
?>