How can error reporting be enabled in PHP to help identify issues with code?

Enabling error reporting in PHP can help identify issues with code by displaying error messages that indicate where problems may exist. This can include syntax errors, undefined variables, or other issues that could be causing unexpected behavior. To enable error reporting in PHP, you can use the error_reporting function to set the level of errors to be displayed.

// Enable error reporting
error_reporting(E_ALL);