Home » PHP » PHP Functions » Question
  1. What will be the output of the following PHP code?
    <?php
    function calculation($Rs, $tax="")
    {
    $Result = $Rs + ($Rs * $tax);
    echo "$Result";
    }
    calculation(80);
    ?>
    1. 160
    2. 0
    3. Erro
    4. 80
    5. None of these
Correct Option: D

You can designate certain arguments as optional by placing them at the end of the list and assigning them a default value of nothing.



Your comments will be displayed only after manual approval.