Using namespaces: Aliases/imports
Allowing the external fully qualified name to be referenced or imported through an alias is an important feature of the namespace. This is somewhat similar to the ability to create symbolic connections to other files or directories in a UNIX-like file system.
The PHP namespace supports two ways to use aliases or imports: Use aliases for class names, or use aliases for namespace names. Note that PHP does not support importing functions or constants.
In PHP, aliases are implemented using the operator use. Here is an example of using all the possible three ways to import:
Example #1 using the use operator to import/use aliases
<?php
Namespace foo;
use my\full\classname as another;
// The following example is the same as use My\Full\NSname as NSname
Use my\full\nsname;
// Import a global class
Use \arrayobject;
$obj = new namespace\Another; // instantiations foo\Another objects
$obj = new Another; // instantiating my\full\classname Object
Nsname\subns\func (); // calling function my\full\nsname\subns\func
$a = new arrayobject (Array (1)); // instantiation arrayobject Object
// if the "Use \arrayobject" is not used, a foo\ArrayObject object is instantiated
?
Note that leading backslashes are unnecessary and do not allow backslashes for names in namespaces that contain the fully qualified name of the namespace delimiter, such as Foo\bar and the relative global names that do not contain namespace delimiters, such as FooBar. Because the imported name must be fully qualified, it will not be resolved relative to the current namespace. Note that for namespaced names (fully qualified namespace names containing namespace separator, such as Foo\bar A s opposed to global names that does not, such as FooBar), the leading backslash are unnecessary and not allowed, as Import names must be fully qualified, and is not processed relative to the current namespace.
To simplify operations, PHP also supports using multiple use statements in a single row
Reference php.net
http://php.net/manual/zh/language.namespaces.importing.php
Using namespaces: Aliases/imports