adplus-dvertising
frame-decoration

Question

What will be the output of the following PHP code ?
<?php
function constant()
{
    define("GREETING", "Welcome to Narnia",true);
    echo greeting;
}
?>

a.

Welcome to Narnia

b.

greeting

c.

GREETING

d.

ERROR

Posted under PHP

Answer: (a).Welcome to Narnia

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What will be the output of the following PHP code ?

Similar Questions

Discover Related MCQs