?
What will be the output of the following PHP code?
What will be the output of the following PHP code?
<?php
function sum($num1, $num2)
{
$total = $num1 + $num2;
echo "chr($total)";
}
$var1 = "sum";
$var1(5, 44);
?>
<?php
function sum($num1, $num2)
{
$total = $num1 + $num2;
echo "chr($total)";
}
$var1 = "sum";
$var1(5, 44);
?>
Answer & Solution
Correct Answer:
Option
C
It is possible to call a function using a variable which stores the function name also the chr() function returns a character from the specified ASCII value.
Join the Discussion
Login to post a comment or share your explanation.
Login