?
What will be the output of the following PHP code ?
What will be the output of the following PHP code ?
<?php
function calc($num1, $num2)
{
$total = $num1 * $num2;
return $total;
}
$result = calc(42, 0);
echo $result;
?>
<?php
function calc($num1, $num2)
{
$total = $num1 * $num2;
return $total;
}
$result = calc(42, 0);
echo $result;
?>
Answer & Solution
Correct Answer:
Option
B
Function returns $total.
Join the Discussion
Login to post a comment or share your explanation.
Login