?
What will happen in this function call?
What will happen in this function call?
<?php
function calc($price, $tax)
{
$total = $price + $tax;
}
$pricetag = 15;
$taxtag = 3;
calc($pricetag, $taxtag);
?>
<?php
function calc($price, $tax)
{
$total = $price + $tax;
}
$pricetag = 15;
$taxtag = 3;
calc($pricetag, $taxtag);
?>
Answer & Solution
Correct Answer:
Option
A
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.
Join the Discussion
Login to post a comment or share your explanation.
Login