哪个变量可以引用全局作用域中可用的全部变量
Posted rsapaper
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了哪个变量可以引用全局作用域中可用的全部变量相关的知识,希望对你有一定的参考价值。
w
http://php.net/manual/en/language.variables.superglobals.php
http://php.net/manual/zh/language.variables.superglobals.php
http://php.net/manual/zh/reserved.variables.globals.php
http://php.net/manual/en/reserved.variables.globals.php
Superglobals
Superglobals — Superglobals are built-in variables that are always available in all scopes
Several predefined variables in PHP are "superglobals", which means they are available in all scopes throughout a script. There is no need to do global $variable; to access them within functions or methods.
These superglobal variables are:
超全局变量 — 超全局变量是在全部作用域中始终可用的内置变量
$GLOBALS
(PHP 4, PHP 5, PHP 7)
$GLOBALS — References all variables available in global scope
An associative array containing references to all variables which are currently defined in the global scope of the script. The variable names are the keys of the array.
$GLOBALS
$GLOBALS — 引用全局作用域中可用的全部变量
一个包含了全部变量的全局组合数组。变量的名字就是数组的键。
以上是关于哪个变量可以引用全局作用域中可用的全部变量的主要内容,如果未能解决你的问题,请参考以下文章