Error Reporting is very Important in order to know exactly which part of the code is not working and to get the cause or the reason for it to not work. We as developers might always think that our code would not run Into any errors after we make the design. But errors are something that happens and it’s something that one does not foresee while coding. It is akin to driving on the road and getting Involved in an accident or if your car breaks down. These events are not planned.
So Suppose we get an error, we need to know what exactly is causing the Issue in order to fix it. Each language has it’s own way for reporting errors. In PHP, in order to enable error reporting, one needs to create a special file in the Project Folder. The file is called php.ini
In this file all you have to do is Include this one line of code-
display_errors = on ;
This turns on error reporting on the project folder.
So, next time if you are working on a project make sure that error reporting is enabled. This is not done by default.