Discussion :: PHP - CS
-
What will be the output of the following PHP code ?
<?php
$a = 10;
$b = 4;
$c = fun(10,4);
function fun($a,$b)
{
$b = 3;
return $a - $b + $b - $a;
}
echo $a;
echo $b;
echo $c;
?>
Answer : Option C
Explanation :
The value returned from the function is 0, and value of a is 10, value of b is 4 and c is 0.
Be The First To Comment