Sr. PHP Programmer Question:

How will you retrieve the error message using Exception class in PHP when error occured?

Senior PHP Programmer Interview Question
Senior PHP Programmer Interview Question

Answer:

Using getMessage() method of Exception class which returns the message of exception.


Previous QuestionNext Question
Difference between mysql_connect and mysql_pconnect?What are the different errors in PHP?