Home / CSE / PHP - CS :: Discussion

Discussion :: PHP - CS

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

    <?php

    function a()

    {

    function b()

    {

    echo 'I am b';

    }

    echo 'I am a';

    }

    a();

    a();

    ?>

  2. A.

     I am b

    B.

     I am bI am a

    C.

     Error

    D.

     I am a Error

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    This will be the output- I am a Fatal error: Cannot redeclare b()


Be The First To Comment