adplus-dvertising
frame-decoration

Question

What will be the output of the following PHP code?
<?php
    function b()
    {
        echo "b is executed";
    }
    function a()
    {
        b();
        echo "a is executed";
        b();
    }
    a();
  ?>

a.

b is executedb is executedb is executed

b.

b is executeda is executed

c.

a is executed

d.

b is executeda is executedb is executed

Posted under PHP

Answer: (d).b is executeda is executedb is executed

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