一道很纠结的php面试题

$a = 1;

$b = 'a';

$a = $b++; 
//$a = 'a'    
//$b = 'b'

$b = $a++;      
//$b = 'a'
//$a = 'b'

$c = set($a).$b;
//$c = 3.'a'
//$c = 3a

echo $c;

function set($a=2,$b=3){

global $a; 
//$a = 'b'    

$c = &$a;                

$a += $b++;  
//$a = 'b' + 3
//$a = 3
//$c = 3   

return $c;
}

你可能感兴趣的:(C++,c,PHP,面试,C#)