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)- A5% (1)
- B75% (15)
- C10% (2)
- D10% (2)
Community Discussion
No community discussion yet for this question.