Q:

What will be the output of the following PHP code?

belongs to collection: ARRAYS AND FUNCTIONS IN PHP MCQ

0

What will be the output of the following PHP code?

<?php
    function calc($price, $tax="")
    {
        $total = $price + ($price * $tax);
        echo "$total"; 
    }
    calc(42); 
    ?>

  1. Error
  2. 0
  3. 42
  4. 200

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

 (c).42

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

ARRAYS AND FUNCTIONS IN PHP MCQ

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
Which of the following are valid function names?... >>
<< What will happen in this function call?...