Home / CSE / PHP - CS :: Discussion

Discussion :: PHP - CS

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

    <?php

    function addFunction($num1, $num2)

    {

    $sum = $num1 + $num2;

    return $sum;

    }

    $return_value = addFunction(10, 20);

    echo "Returned value from the function : $return_value"

    ?>

  2. A.

     Returned value from the function : $return_value

    B.

     Error

    C.

     Returned value from the function : 30

    D.

     Returned value from the function :

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    Functions returns value 30.


Be The First To Comment