Error Handling interview questions

15 real Error Handling questions from the PHP bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.

1. What is Exception?

Junior
  1. A.an object representing an anomalous condition that is thrown to interrupt normal flow and caught by a surrounding handler block
  2. B.the base interface, implemented by both Error and Exception, that any object must satisfy to be usable with the throw statement
  3. C.an optional clause after try and catch whose code always runs whether or not an exception was thrown, typically used for cleanup
  4. D.passing a previous throwable as the third constructor argument so the original cause is preserved and retrievable while a new exception is raised
Reveal the answer + AI explanation — free account

2. Which term means: "an object representing an anomalous condition that is thrown to interrupt normal flow and caught by a surrounding handler block"?

Junior
  1. A.Exception
  2. B.finally block
  3. C.Throwable
  4. D.Exception chaining
Reveal the answer + AI explanation — free account

3. Which statement is correct?

Junior
  1. A.Exception — passing a previous throwable as the third constructor argument so the original cause is preserved and retrievable while a new exception is raised
  2. B.Exception — an object representing an anomalous condition that is thrown to interrupt normal flow and caught by a surrounding handler block
  3. C.Exception — an optional clause after try and catch whose code always runs whether or not an exception was thrown, typically used for cleanup
  4. D.Exception — the hierarchy introduced in PHP 7 for internal engine problems such as type mismatches and calls to undefined functions, kept separate from user-level exceptions
Reveal the answer + AI explanation — free account

4. What is finally block?

Mid
  1. A.the hierarchy introduced in PHP 7 for internal engine problems such as type mismatches and calls to undefined functions, kept separate from user-level exceptions
  2. B.the base interface, implemented by both Error and Exception, that any object must satisfy to be usable with the throw statement
  3. C.an optional clause after try and catch whose code always runs whether or not an exception was thrown, typically used for cleanup
  4. D.an object representing an anomalous condition that is thrown to interrupt normal flow and caught by a surrounding handler block
Reveal the answer + AI explanation — free account

6. Which statement is correct?

Mid
  1. A.finally block — an object representing an anomalous condition that is thrown to interrupt normal flow and caught by a surrounding handler block
  2. B.finally block — an optional clause after try and catch whose code always runs whether or not an exception was thrown, typically used for cleanup
  3. C.finally block — the base interface, implemented by both Error and Exception, that any object must satisfy to be usable with the throw statement
  4. D.finally block — the hierarchy introduced in PHP 7 for internal engine problems such as type mismatches and calls to undefined functions, kept separate from user-level exceptions
Reveal the answer + AI explanation — free account

7. What is Throwable?

Mid
  1. A.the base interface, implemented by both Error and Exception, that any object must satisfy to be usable with the throw statement
  2. B.an object representing an anomalous condition that is thrown to interrupt normal flow and caught by a surrounding handler block
  3. C.passing a previous throwable as the third constructor argument so the original cause is preserved and retrievable while a new exception is raised
  4. D.the hierarchy introduced in PHP 7 for internal engine problems such as type mismatches and calls to undefined functions, kept separate from user-level exceptions
Reveal the answer + AI explanation — free account

8. Which term means: "the base interface, implemented by both Error and Exception, that any object must satisfy to be usable with the throw statement"?

Mid
  1. A.finally block
  2. B.Exception chaining
  3. C.Exception
  4. D.Throwable
Reveal the answer + AI explanation — free account

9. Which statement is correct?

Mid
  1. A.Throwable — the hierarchy introduced in PHP 7 for internal engine problems such as type mismatches and calls to undefined functions, kept separate from user-level exceptions
  2. B.Throwable — an optional clause after try and catch whose code always runs whether or not an exception was thrown, typically used for cleanup
  3. C.Throwable — passing a previous throwable as the third constructor argument so the original cause is preserved and retrievable while a new exception is raised
  4. D.Throwable — the base interface, implemented by both Error and Exception, that any object must satisfy to be usable with the throw statement
Reveal the answer + AI explanation — free account

10. What is Error class?

Mid
  1. A.an optional clause after try and catch whose code always runs whether or not an exception was thrown, typically used for cleanup
  2. B.an object representing an anomalous condition that is thrown to interrupt normal flow and caught by a surrounding handler block
  3. C.passing a previous throwable as the third constructor argument so the original cause is preserved and retrievable while a new exception is raised
  4. D.the hierarchy introduced in PHP 7 for internal engine problems such as type mismatches and calls to undefined functions, kept separate from user-level exceptions
Reveal the answer + AI explanation — free account

11. Which term means: "the hierarchy introduced in PHP 7 for internal engine problems such as type mismatches and calls to undefined functions, kept separate from user-level exceptions"?

Mid
  1. A.Error class
  2. B.Throwable
  3. C.Exception
  4. D.finally block
Reveal the answer + AI explanation — free account

12. Which statement is correct?

Mid
  1. A.Error class — an object representing an anomalous condition that is thrown to interrupt normal flow and caught by a surrounding handler block
  2. B.Error class — the base interface, implemented by both Error and Exception, that any object must satisfy to be usable with the throw statement
  3. C.Error class — passing a previous throwable as the third constructor argument so the original cause is preserved and retrievable while a new exception is raised
  4. D.Error class — the hierarchy introduced in PHP 7 for internal engine problems such as type mismatches and calls to undefined functions, kept separate from user-level exceptions
Reveal the answer + AI explanation — free account

13. What is Exception chaining?

Senior
  1. A.the hierarchy introduced in PHP 7 for internal engine problems such as type mismatches and calls to undefined functions, kept separate from user-level exceptions
  2. B.an object representing an anomalous condition that is thrown to interrupt normal flow and caught by a surrounding handler block
  3. C.the base interface, implemented by both Error and Exception, that any object must satisfy to be usable with the throw statement
  4. D.passing a previous throwable as the third constructor argument so the original cause is preserved and retrievable while a new exception is raised
Reveal the answer + AI explanation — free account

14. Which term means: "passing a previous throwable as the third constructor argument so the original cause is preserved and retrievable while a new exception is raised"?

Senior
  1. A.Throwable
  2. B.Error class
  3. C.finally block
  4. D.Exception chaining
Reveal the answer + AI explanation — free account

15. Which statement is correct?

Senior
  1. A.Exception chaining — an optional clause after try and catch whose code always runs whether or not an exception was thrown, typically used for cleanup
  2. B.Exception chaining — passing a previous throwable as the third constructor argument so the original cause is preserved and retrievable while a new exception is raised
  3. C.Exception chaining — an object representing an anomalous condition that is thrown to interrupt normal flow and caught by a surrounding handler block
  4. D.Exception chaining — the base interface, implemented by both Error and Exception, that any object must satisfy to be usable with the throw statement
Reveal the answer + AI explanation — free account

Free to start

Answers, AI explanations, and a scored voice mock interview

Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take one full AI mock interview — scored like a real panel.

Practice Error Handling free