📅  最后修改于: 2022-03-11 14:54:08.625000             🧑  作者: Mango
$a = 1;
$b = 2;
function Sum(){
global $a, $b; // allows access to vars outside of function
$b = $a + $b;
}
Sum();
echo $b; // output is 3