A
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;
?>
function doSomething(&$argument)
{
$Result = $argument;
$argument += 1;
return $Result;
}
$n = 5;
$m = doSomething($n);
echo "n = " . $n . " and m = " . $m;
?>
- Correct Answer - Option(B)
- Views: 39
- Filed under category PHP
- Hashtags:
Discusssion
Login to discuss.