What specific PHP function can be used to set error reporting and display errors for debugging purposes?

To set error reporting and display errors for debugging purposes in PHP, you can use the `error_reporting` function to specify which errors should be reported and the `ini_set` function to enable error display.

// Set error reporting
error_reporting(E_ALL);

// Display errors
ini_set('display_errors', 1);