Handling and Avoiding Errors in PHP

Understanding Error Levels In PHP

Whenever any error occur while running the script then the PHP engine triggers an error. There are fifteen different levels of errors are available in PHP, and each level is represented by an integer value and an associated constant. Here, we will discuss all the different levels of errors in brief. Error Level Value Description …

Understanding Error Levels In PHP Read More »

Trigger Errors In PHP

The PHP engine Trigger Errors is  an error whenever it encounters a problem with the script, a user can also trigger errors themselves. It can help to make the application more robust, because it can flag potential problems before they turn into serious errors. It also means that the application can generate more user – …

Trigger Errors In PHP Read More »

Logging Your Own Error Messages In PHP

logging-error-messages-php When an error is raised, the PHP engine usually logs the error message somewhere. A user can control exactly where the error message is logged by using a few PHP configuration directives: display_errors: This controls the error messages are displayed in the browser. A user can Set to On to display errors, or Off …

Logging Your Own Error Messages In PHP Read More »

Using Exception Objects to Handle Errors In PHP

PHP gives an exceptions, which are used for triggering and handling error conditions. Rather than returning a single error value, the method or function can create a rich Exception object that includes detailed information about the problem and then throw the object up to the calling code to handle, or catch. Another nice feature of …

Using Exception Objects to Handle Errors In PHP Read More »