15 Error Handling questions from the PHP bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.
Free to start: the 2-minute IT readiness check — six questions and a result.
A.an object representing an anomalous condition that is thrown to interrupt normal flow and caught by a surrounding handler block
B.the base interface, implemented by both Error and Exception, that any object must satisfy to be usable with the throw statement
C.an optional clause after try and catch whose code always runs whether or not an exception was thrown, typically used for cleanup
D.passing a previous throwable as the third constructor argument so the original cause is preserved and retrievable while a new exception is raised
Answer + AI explanation with Pro
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
A.Exception
B.finally block
C.Throwable
D.Exception chaining
Answer + AI explanation with Pro
3. Which statement is correct?
Junior
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
B.Exception — an object representing an anomalous condition that is thrown to interrupt normal flow and caught by a surrounding handler block
C.Exception — an optional clause after try and catch whose code always runs whether or not an exception was thrown, typically used for cleanup
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
Answer + AI explanation with Pro
4. What is finally block?
Mid
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
B.the base interface, implemented by both Error and Exception, that any object must satisfy to be usable with the throw statement
C.an optional clause after try and catch whose code always runs whether or not an exception was thrown, typically used for cleanup
D.an object representing an anomalous condition that is thrown to interrupt normal flow and caught by a surrounding handler block
Answer + AI explanation with Pro
5. Which term means: "an optional clause after try and catch whose code always runs whether or not an exception was thrown, typically used for cleanup"?
Mid
A.Exception
B.finally block
C.Throwable
D.Error class
Answer + AI explanation with Pro
6. Which statement is correct?
Mid
A.finally block — an object representing an anomalous condition that is thrown to interrupt normal flow and caught by a surrounding handler block
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
C.finally block — the base interface, implemented by both Error and Exception, that any object must satisfy to be usable with the throw statement
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
Answer + AI explanation with Pro
7. What is Throwable?
Mid
A.the base interface, implemented by both Error and Exception, that any object must satisfy to be usable with the throw statement
B.an object representing an anomalous condition that is thrown to interrupt normal flow and caught by a surrounding handler block
C.passing a previous throwable as the third constructor argument so the original cause is preserved and retrievable while a new exception is raised
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
Answer + AI explanation with Pro
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
A.finally block
B.Exception chaining
C.Exception
D.Throwable
Answer + AI explanation with Pro
9. Which statement is correct?
Mid
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
B.Throwable — an optional clause after try and catch whose code always runs whether or not an exception was thrown, typically used for cleanup
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
D.Throwable — the base interface, implemented by both Error and Exception, that any object must satisfy to be usable with the throw statement
Answer + AI explanation with Pro
10. What is Error class?
Mid
A.an optional clause after try and catch whose code always runs whether or not an exception was thrown, typically used for cleanup
B.an object representing an anomalous condition that is thrown to interrupt normal flow and caught by a surrounding handler block
C.passing a previous throwable as the third constructor argument so the original cause is preserved and retrievable while a new exception is raised
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
Answer + AI explanation with Pro
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
A.Error class
B.Throwable
C.Exception
D.finally block
Answer + AI explanation with Pro
12. Which statement is correct?
Mid
A.Error class — an object representing an anomalous condition that is thrown to interrupt normal flow and caught by a surrounding handler block
B.Error class — the base interface, implemented by both Error and Exception, that any object must satisfy to be usable with the throw statement
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
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
Answer + AI explanation with Pro
13. What is Exception chaining?
Senior
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
B.an object representing an anomalous condition that is thrown to interrupt normal flow and caught by a surrounding handler block
C.the base interface, implemented by both Error and Exception, that any object must satisfy to be usable with the throw statement
D.passing a previous throwable as the third constructor argument so the original cause is preserved and retrievable while a new exception is raised
Answer + AI explanation with Pro
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
A.Throwable
B.Error class
C.finally block
D.Exception chaining
Answer + AI explanation with Pro
15. Which statement is correct?
Senior
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
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
C.Exception chaining — an object representing an anomalous condition that is thrown to interrupt normal flow and caught by a surrounding handler block
D.Exception chaining — the base interface, implemented by both Error and Exception, that any object must satisfy to be usable with the throw statement
Answer + AI explanation with Pro
Free to start
Start with a free readiness check
Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every Error Handling question come with Pro.