在不執行程式的情況下,你覺得的輸出結果是什麼?
複製程式碼
先別提前偷看答案哦
答案揭曉:http://www.phpthinking.com/archives/651
-
<?php
-
$var1 = 1;
-
$var2 = 2;
-
function test(){
-
global $var1,$var2;
-
$var2 = &$var1;
-
}
-
test();
-
echo $var2;
- ?>
先別提前偷看答案哦
答案揭曉:http://www.phpthinking.com/archives/651