How can error_reporting in PHP be configured to display syntax errors more clearly?

To display syntax errors more clearly in PHP, you can set the error_reporting level to include E_ALL and enable display_errors in your php.ini file. This will ensure that all errors, including syntax errors, are displayed on the screen for easier debugging.

// Set error reporting level to include all types of errors
error_reporting(E_ALL);

// Enable displaying errors on the screen
ini_set('display_errors', 1);