Is it possible to define a custom super global variable? (whether in code, or using php.ini)
Example, for all projects I use a custom framework. The framework essentially stores all data about running instance of the script (template loaded, template variables, etc.) in a single variable. I’d like that variable to become cross-system accessible.
I am perfectly aware of $_GLOBALS and global, however the question is asking if it is possible to define custom super global variable, e.g. $foo, which would become accessible by the same name in any scop.
Sadly there is no way to define superglobals.
Source