------解決方案--------------------
我猜 沒有吧
------解決方案--------------------
這個不明白啊
------解決方案--------------------
namespace foo;
use My\Full\Classname as Another;
// this is the same as use My\Full\NSname as NSname
use My\Full\NSname;
// importing a global class
use ArrayObject;
$obj = new namespace\Another; // instantiates object of class foo\Another
$obj = new Another; // instantiates object of class My\Full\Classname
NSname\subns\func(); // calls function My\Full\NSname\subns\func
$a = new ArrayObject(array(1)); // instantiates object of class ArrayObject
// without the "use ArrayObject" we would instantiate an object of class foo\ArrayObject
?>
好像是給一個類定義別名:如下
use class3 as Another;
use class3 as Another1;
use class3 as Another2;
$obj = new Another; //
$obj = new Another1; //
$obj = new Another2; //