nerdexam
Zend

200-710 · Question #133

What is the result of the following code? ``php 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
  • CPI
  • DT::PI

How the community answered

(20 responses)
  • A
    5% (1)
  • B
    75% (15)
  • C
    10% (2)
  • D
    10% (2)

Community Discussion

No community discussion yet for this question.

Full 200-710 Practice