A

Admin • 832.27K Points
Coach

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

Code:
<?php
function doSomething( &$arg )
{
$return = $arg;
$arg += 1;
return $return;
}
$a = 3;
$b = doSomething( $a );
?>
  • (A) a is 3 and b is 4
  • (B) a is 4 and b is 3
  • (C) Both are 3
  • (D) Both are 4
  • Correct Answer - Option(B)
  • Views: 17
  • 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.