What exactly is the global context? I have been reading the documentation for module_load_include() and there's a warning that says:


  Do not use this function in a global context since it requires Drupal to be fully bootstrapped, use require_once DRUPAL_ROOT . '/path/file' instead.


Now I'm not sure what this "global context" means. I guess a page callback function is not in global context because I'd have to do a global $user to access the user entity. The only global context instance I can think of is in the index.php file at the root directory, but I don't think people normally  code on this file because it'd be "hacking" Drupal core.

Am I just missing the whole concept of global context as used in Drupal?
It means the global scope, ie anything outside a function and namespace. It's the PHP 'global', not anything specific to drupal.

People tend to use module_load_include at the top of .module files to bring in includes, much like in a traditional standalone PHP project.

This is potentially bad because the required elements might not have been bootstrapped at that point, which can lead to errors; hence the warning not to use it in a global context.