Sr. PHP Programmer Question:
Download Questions PDF

How will you retrieve code of exception using Exception class in PHP when error occured?

Answer:

Using getCode() method of Exception class which returns the code of exception.

Download Senior PHP Programmer Interview Questions And Answers PDF

Previous QuestionNext Question
What does "&" mean in '&$var'?How will you find the length of a string in PHP?