A
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 );
?>
function doSomething( &$arg )
{
$return = $arg;
$arg += 1;
return $return;
}
$a = 3;
$b = doSomething( $a );
?>
- Correct Answer - Option(B)
- Views: 17
- Filed under category PHP
- Hashtags:
Discusssion
Login to discuss.