会动的耳朵  

 

 1 print_r(a2());
 2 function a2()
 3 {
 4     $arr['a'] = 300;
 5     foreach($arr as $k => &$v)
 6     {
 7         a1($v);
 8     }
 9     return $arr;
10 }
11 function a1(&$v)
12 {
13     $v = 100;
14 }
15 exit;

输出:

1 Array ( [a] => 100 )

 

posted on 2013-04-01 09:18  会动的耳朵  阅读(120)  评论(0编辑  收藏  举报