nerdexam
National_Instruments

200-500 · Question #173

What is the result of the following code? define('PI', 3.14); class T { const PI = PI; } class Math { const PI = T::PI; } echo Math::PI;

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

Question

What is the result of the following code? define('PI', 3.14); class T { const PI = PI; } class Math { const PI = T::PI; } echo Math::PI;

Options

  • AParse error
  • B3.14

How the community answered

(30 responses)
  • A
    23% (7)
  • B
    77% (23)

Community Discussion

No community discussion yet for this question.

Full 200-500 Practice