Tuesday, 8 June 2021

Php: Exception handling

An exception represent an erroneous condition in the program.

 

Example

a.   you will get an exception when you try to perform some operation on unset variable.

b.   Accessing array element beyond its size throws an exception by Php

c.    When you are trying to read data from an url, but the service is down, then you will get service unavailable exception etc.,

 

Exception class is the base class for all the exceptions in Php.

Previous                                                    Next                                                    Home

No comments:

Post a Comment