Home » PHP » PHP Functions » Question
  1. What will be the output of the following PHP code?
    <?php
    function addation($n1, $n2)
    {
    $add = $n1 + $n2;
    return $add;
    }
    $return_val = addation(50, 70);
    echo "Returned value : $return_val"
    ?>
    1. Returned value : 120
    2. Returned value : 50
    3. Returned value : 70
    4. Error
    5. None of these
Correct Option: A

Functions returns value 120.



Your comments will be displayed only after manual approval.