Set PHP Error Reporting Into The PHP File

In This Article

On PHP Error Reporting, first, you have to know about What is error reporting in PHP and how we enable it. Here is the list of the major part of error reporting in PHP which we talked about in this tutorial,

  • What is PHP error reporting?
  • About PHP error reporting on and off.

What is PHP Error Reporting?

PHP has a main configuration file (PHP.ini) which we use to enable error reporting and also used for turn on necessary extensions.

Now we check if we do not have any access to the php.ini configuration file then how can we turn on the error reporting.

About PHP Error Reporting On And Off

Turn On PHP Error Reporting

Below source code shows all errors, warnings, and notices of the PHP program.

The ini_set function will try to override the PHP configuration file source code.

Turn Off PHP Error Reporting

Below source code is used for off all the type of PHP errors from the execution.

If user wants to turn on or off specific error reporting,

Here is the complete explanations of error reporting in PHP. Please let me know if you got any issue.

To know more you can check official site

Also Check:

Happy Coding..!

Originally Published on: Set PHP Error Reporting Into The PHP File — PHPCODER.TECH