adplus-dvertising
frame-decoration

Question

What will be the output of the following PHP code?
<?php
    function a()  
    {
        function b()
        {
            echo 'I am b';
        }
        echo 'I am a';
    }
    b();
    a();
    ?>

a.

I am b

b.

I am bI am a

c.

Error

d.

I am a Error

Posted under PHP

Answer: (c).Error

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