MCQs > IT & Programming > PHP 5 > Which is correct about the following snippet? const C = 2; class example { const D = C * 2; const E = C + self::D; const F = } echo example::D, PHP_EOL; echo example::F; ?>

PHP 5 MCQs

Which of the given statements is correct about the following PHP 7.1 code snippet?

const C = 2;

class example {

const D = C * 2;

const E = C + self::D;

const F = }

echo example::D, PHP_EOL;

echo example::F;

?>

Answer

Correct Answer:

The code will compile successfully and will print the following output:

4

The result is 6 


Explanation:

Note: This Question is unanswered, help us to find answer for this one

PHP 5 Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

PHP 5 Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it