-
What will be the output of the following PHP code?
<?php
function calculate($p, $t="")
{
$total = $p + ($p * $t);
echo "$total";
}
calculate(65);
?>
-
- Nothing
- Error
- 56
- 65
- None of these
Correct Option: D
You can designate certain arguments as optional by placing them at the end of the list and assigning them a default value of nothing.