功能範圍
函式內部的變數位於這樣的區域性範圍內
$number = 5
function foo(){
$number = 10
return $number
}
foo(); //Will print 10 because text defined inside function is a local variable
函式內部的變數位於這樣的區域性範圍內
$number = 5
function foo(){
$number = 10
return $number
}
foo(); //Will print 10 because text defined inside function is a local variable