Home » PHP » PHP Functions » Question
  1. What will happen in this function call?
    <?php
    function calc($num, $num1)
    {
    $sum = $num + $num1;
    echo $sum;
    }
    $n = 20;
    $n1 = 10;
    calc($n, $n1);
    ?>
    1. Call By Reference
    2. Type Hinting
    3. Call By Value
    4. Default Argument Value
    5. None of these
Correct Option: C

When you pass an argument in the above manner or say we pass 15 and 3 directly, it is called passing by value or call by value.



Your comments will be displayed only after manual approval.