SqArr=array();        $this->rear=0;    }    //销毁链栈    public function DestroyQueue(){        $this->SqArr=null;        $this->rear=0;    }    //清空队列    public function ClearQueue(){        $this->SqArr=array();        $this->rear=0;    }    //队列是否为空    public function QueueEmpty(){        if($this->rear==0){            return 'Null';        }else{            return 'No Null';        }    }    //队列的长度    public function QueueLength(){        return $this->rear;    }    //取得队头元素    public function GetHead(){        return $this->SqArr[0];    }    //从队尾插入元素    public function EnQueue($elem){        $this->SqArr[$this->rear++]=$elem;    }    //从队头删除元素    public function DeQueue(){        if($this->rear == 0){            return 'ERROR';        }        for($i=1;$i<$this->rear;$i++){            $this->SqArr[$i-1]=$this->SqArr[$i];        }        unset($this->SqArr[$this->rear-1]);//移动完成后,最后一个元素也就最后一个元素也就不存在了,所以释放掉。        $this->rear--;        return 'OK';    }    //遍历队列元素    public function QueueTraverse(){        $arr=array();        for($i=0;$i<$this->rear;$i++){            $arr[]=$this->SqArr[$i];        }        return $arr;        return $this->SqArr;    }}