Home > Backend Development > PHP Tutorial > php基础-$GLOBALS内置变量的运用

php基础-$GLOBALS内置变量的运用

WBOY
Release: 2016-06-13 10:49:36
Original
939 people have browsed it

php基础-$GLOBALS内置变量的使用

一个包含了全部变量的全局组合数组。变量的名字就是数组的键:

?

??? $testAttr = "testsetest";
??? echo $GLOBALS['testAttr'];
??? echo funckFuc();
???
??? function funckFuc(){
????? return $GLOBALS['testAttr'];
??? }

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template