Here is an overview of code constructs that go into the global namespace:
functions
classes
interfaces
traits
enumerations
constants (not class constants)
variables defined outside of functions and methods