adplus-dvertising
frame-decoration

Question

What will happen in this function call?
<?php
    function calc($price, $tax) 
    {
        $total = $price + $tax;
    }
    $pricetag = 15;
    $taxtag = 3;
    calc($pricetag, $taxtag); 
    ?>

a.

Call By Value

b.

Call By Reference

c.

Default Argument Value

d.

Type Hinting

Answer: (a).Call By Value

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What will happen in this function call?

Similar Questions

Discover Related MCQs

Q. Which of the following are valid function names?

i) function()
ii) €()
iii) .function()
iv) $function()

Q. A function in PHP which starts with __ (double underscore) is know as..

Q. PHP’s numerically indexed array begin with position ___________

Q. Which of the following are correct ways of creating an array?

i) state[0] = “karnataka”;
ii) $state[] = array(“karnataka”);
iii) $state[0] = “karnataka”;
iv) $state = array(“karnataka”);

Q. Which function will return true if a variable is an array or false if it is not?

Q. Which in-built function will add a value to the end of an array?

Q. Which function can be used to move the pointer to the previous array position?

Q. Which function returns an array consisting of associative key/value pairs?

Q. Which of the functions is used to sort an array in descending order?

Q. Which one of the following PHP functions can be used to build a function that accepts any number of arguments?

Q. Which one of the following PHP functions can be used to find files?

Q. Which of the following PHP functions can be used to get the current memory usage?

Q. Which of the following PHP functions can be used for generating unique ids?

Q. Which one of the following functions can be used to compress a string?