What is the relation between compile time execution of import/use and its scope and dynamics?
问题 This question originates from my previous question Why do fully qualified names have to be used when dynamically assessing namespaced elements? and another question Use php namespace inside function. Both of these questions boil down to the following explanation by php.net: Importing is performed at compile-time, and so does not affect dynamic class, function or constant names.... ....The use keyword must be declared in the outermost scope of a file (the global scope) or inside namespace