public function dequeue() {
        if ($this->isEmpty()) {
            return false;
        }
        $this->tail = $this->tail % $this->size;
        $data = $this->elements[$this->tail];
        $this->tail++;
        return $data;
    }