nerdexam
National_Instruments

200-500 · Question #33

Would the following code catch a parse error? try { echo $label } catch (Exception $e) { echo $e->getMessage(); }

The correct answer is B. No. See the full explanation below for the reasoning.

Question

Would the following code catch a parse error? try { echo $label } catch (Exception $e) { echo $e->getMessage(); }

Options

  • AYes
  • BNo

How the community answered

(51 responses)
  • A
    29% (15)
  • B
    71% (36)

Community Discussion

No community discussion yet for this question.

Full 200-500 Practice