nerdexam
Zend

200-710 · Question #9

What exception type will catch the error raised by the expression 2 / 0?

The correct answer is C. DivisionByZeroError. See the full explanation below for the reasoning.

Error Handling

Question

What exception type will catch the error raised by the expression 2 / 0?

Options

  • ALogicException
  • BRangeException
  • CDivisionByZeroError
  • DArithmeticError

How the community answered

(40 responses)
  • A
    8% (3)
  • B
    18% (7)
  • C
    73% (29)
  • D
    3% (1)

Topics

#DivisionByZeroError#exception hierarchy#arithmetic errors#error types

Community Discussion

No community discussion yet for this question.

Full 200-710 Practice