Displaying Errors

Hi Viewers, Today i am going to  discuss about php errors.
What is an error?
Error is nothing but unexpected program result which cannot be handled by Program itself. Errors are resolved by fixing the program. An example of an error would be an infinite loop that never stops executing.
Types of PHP errors:

Reporting Level Description Example
E_WARNING Displays warning messages only. Does not halt the execution of the script error_reporting(E_WARNING);
E_NOTICE Displays notices that can occur during normal execution of a program or could be an error. error_reporting(E_ NOTICE);
E_USER_ERROR Displays user generated errors i.e. custom error handler error_reporting(E_ USER_ERROR);
E_USER_WARNING Displays user generated warning messages error_reporting(E_USER_WARNING);
E_USER_NOTICE Displays user generated notices error_reporting(E_USER_NOTICE);
E_RECOVERABLE_ERROR Displays error that are not fatal and can be handled using custom error handlers error_reporting(E_RECOVERABLE_ERROR);
E_ALL Displays all errors and warnings error_reporting(E_ ALL);
Updated: December 3, 2016 — 2:25 pm

Leave a Reply

Your email address will not be published.

prabaweb.in Codelab- programming blog © 2017