php 在函数中使用$GLOBALS定义全局变量,在函数外使用,提示变量为申明

function demo(){
$GLOBALS['three'] = 'china';
}
demo();
echo $three. '
';

https://blog.csdn.net/wutao_water/article/details/38725903