Unless you modify the PHP runtime, this is not possible. namespace
and use
declarations are only valid in the physical file they appear in. These declarations do not span across include
s. If they did you'd have a real nightmare managing namespaces and aliases.
Declaring these at the top of each file is simply something you'll have to live with. Most languages that have features similar to PHP's namespaces do the same.