MCQs > IT & Programming > PHP 5 > Which 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);?>

PHP 5 MCQs

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);?>


Answer

Correct Answer:

NULL

int(20)

int(12)  


Explanation:

Note: This Question is unanswered, help us to find answer for this one

PHP 5 Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

More PHP 5 MCQ Questions

search

PHP 5 Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it