A

Admin • 833.24K Points
Coach

Q. What is the value of $a and $b after the function call?

Code:
<?php
function doSomething(&$argument)
{
$Result = $argument;
$argument += 1;
return $Result;
}
$n = 5;
$m = doSomething($n);
echo "n = " . $n . " and m = " . $m;
?>
  • (A) n = 6
  • (B) n = 6 and m = 5
  • (C) m = 6
  • (D) Error
  • Correct Answer - Option(B)
  • Views: 39
  • Filed under category PHP
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.