adplus-dvertising
frame-decoration

Question

What will be the output of the following PHP code ?
<?php
    function TV($string)
    {
        echo "my favourite TV show is ".$string;
        function b()
        {
            echo " I am here to spoil this code";
        }
    }
    function b()
    {
        echo " I am here to spoil this code";
    }
    b();
?>

a.

I am here to spoil this code

b.

Error

c.

my favourite TV show isI am here to spoil this code

d.

None of the mentioned

Posted under PHP

Answer: (a).I am here to spoil this code

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