What will be the output of the following PHP code?
<?php
function calc($price, $tax="")
{
$total = $price + ($price * $tax);
echo "$total";
}
calc(42);
?>
<?php
function calc($price, $tax="")
{
$total = $price + ($price * $tax);
echo "$total";
}
calc(42);
?>
A. Error
B. 0
C. 42
D. 84
Answer: Option C
Join The Discussion