面试题

1

问:

$kfw=[‘k’,’f’,’w’,’g’];
foreach ($kfw as $key => $v) {
$v=&$kfw[$key];
}
print_r($kfw);

答:

Array ( [0] => f [1] => w [2] => g [3] => g )

2

问:

$kh=1;
$zc=2;
function sum(){
global $kh,$zc;
$zc=($kh–)+$zc;
}
sum();
echo $zc;

答:3

3

问:用示意图,说明git并行开发使用流程