Core PHP

Set PHP Error Reporting Into The PHP File

On PHP Error Reporting, first, you have to know about What is error reporting in PHP and how we enable it. Here...

Written by Bikash · 1 min read >
PHP Error Reporting

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.
PHP Error Reporting
PHP Error Reporting

What is PHP Error Reporting?

Error reporting is an inbuilt feature of PHP and used to show all errors, notices, and warnings of the PHP file at the time of execution.

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.

Also Read: Complete Guide PHP Error Log

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 https://www.php.net/manual/en/.

Also Check:

Happy Coding..!

Was this article helpful?
YesNo
Written by Bikash
My name is Bikash Kr. Panda. I own and operate PHPCODER.TECH. I am a web Programmer by profession and working on more than 50 projects to date. Currently I am working on the web-based project and all the CMS and frameworks which are based on PHP. Profile

4 Replies to “Set PHP Error Reporting Into The PHP File”

Leave a Reply

Your email address will not be published. Required fields are marked *