$GLOBALS Is Not Defined¶
$GLOBALS is a PHP superglobal, which is always available, no matter the context. It is also not possible to write it, not to unset it.
Yet, it is possible to get that cryptic error message that it is not available.
This happens when trying to reach the context $GLOBALS via the variable that holds all globals: $GLOBALS. That particular entry is unreachable, as it may lead to circular references. Yet, the error message is the same as for any other global.
See Also¶
No $GLOBALS here [Try me]