"/>
Home / CSE / PHP - CS :: Discussion

Discussion :: PHP - CS

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

    <?php

    function foo($msg)

    {

    echo "$msg";

    }

    $var1 = "foo";

    $var1("will this work");

    ?>

  2. A.

     Error

    B.

     $msg

    C.

     0

    D.

     Will this work

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    It is possible to call a function using a variable which stores the function name.


Be The First To Comment