$foo = "Example content";function test() { global $foo; echo '$foo in current scope: ' . $foo . "\n";}test() ;在函数内部声明为全局变量会引用外部的值