我在面試中看到了一個PHP測試中的$$ var。我想知道那是什麼..
感謝
我在面試中看到了一個PHP測試中的$$ var。我想知道那是什麼..
感謝
$var = 'something';
$$var = 'lol';
echo $something will output "lol"
這是一個可變的變量。
這是指特定變量的值。
如:
$test = "Hi";
$var = "test";
現在$$var
將顯示「嗨」
可變變量 - 檢查鏈接了!
這是一個變量:http://www.php.net/manual/en/language.variables.variable.php – 2013-04-10 16:40:38
[Manual](http://de3.php.net/manual/en/language。 variables.variable.php),[Duplicate 1](http://stackoverflow.com/questions/2715654/what-does-mean-in-php),[Duplicate 2](http://stackoverflow.com/questions/ 4169882/what-in-php),[Duplicate 3](http://stackoverflow.com/questions/4891872/function-and-variable) – Kermit 2013-04-10 16:41:12