3 ms·
Well...there is the global operator, and it takes into account the entire running "stack of files" - so include your config.php, lib.php wrappers, which in turn
by jdhawk 12y ago
Well...there is the global operator, and it takes into account the entire running "stack of files" - so include your config.php, lib.php wrappers, which in turn include other files for your application/framework, and then use the global $var tag in every function, and you get a reference to a truly global variable.
http://php.net/manual/en/language.variables.scope.php http://php.net/manual/en/language.variables.scope.php
PHP also has "superglobals"
http://php.net/manual/en/language.variables.superglobals.php http://php.net/manual/en/language.variables.superglobals.php