Which of the given options is the correct output of the following PHP 7.1 program?
function swap(&$x, &$y): void
{
if ($x === $y) {
return;
}
$exp = $x;
$x = $y;
$y = $exp;
}
$var1 = 12;
$var2 = 20;
var_dump(swap($var1, $var2), $var1, $var2);?>
Correct Answer:
NULL
int(20)
int(12)
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More PHP 5 MCQ Questions