PHP的函数中使用全局变量

{{ time }}

示例代码如下

<?php

$q= 'qqqqq';
function test()
{
    global $q;
    echo $q;
}
test();