What will be the value of $a and $b after the function call in the following PHP code? <?php function doSomething( &$arg ) { $return = $arg; $arg += 1; return $return; } $a = 3; $b = doSomething( $a ); ?>

Question:What will be the value of $a and $b after the function call in the following PHP code? <?php function doSomething( &$arg ) { $return = $arg; $arg += 1; return $return; } $a = 3; $b = doSomething( $a ); ?>

1.a is 3 and b is 4

2. a is 4 and b is 3

3.Both are 3

4.Both are 4


Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!