Q:

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

belongs to collection: BASICS OF PHP MCQ

0

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

<?php
    function doSomething( &$arg ) {
        $return = $arg;
        $arg += 1;
        return $return; 
    }
    $a = 3;
    $b = doSomething( $a );
    ?>

  1. a is 4 and b is 44
  2. a is 4 and b is 3
  3. a is 4 and b is 35
  4. a is 4 and b is 10

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

 (b).a is 4 and b is 3

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

BASICS OF PHP MCQ

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
Who is the father of PHP?... >>
<< If $a = 12 what will be returned when ($a == 12) ?...