You can't access the superglobals via variable variables (as you did with expressions like ${'_' . $a}) as stated in the manual Variable variables:
Warning Please note that variable variables cannot be used with PHP's Superglobal arrays within functions or class methods. The variable $this is also a special variable that cannot be referenced dynamically.
发布评论
评论(1)
您无法通过变量(如
$ {'_''。$ a}
)通过变量访问超级全局,如手册变量变量:You can't access the superglobals via variable variables (as you did with expressions like
${'_' . $a}
) as stated in the manual Variable variables: