What is the purpose of using error_reporting(E_ALL) at the beginning of a PHP script?

Using error_reporting(E_ALL) at the beginning of a PHP script sets the error reporting level to report all errors, warnings, and notices. This can be helpful for debugging and identifying issues in the code. It ensures that all errors are displayed, making it easier to troubleshoot and fix any problems that may arise during the execution of the script.

<?php
error_reporting(E_ALL);
// Your PHP code here
?>