# SplQueue - 队列

[官方地址](http://php.net/manual/zh/class.splqueue.php)

队列这种数据结构简单，就像我们生活中排队一样，它的特性是先进先出(FIFO)。

![](/files/-LfnTKMvw0Yu9bpo5Do2)

PHP SPL中SplQueue类就是实现队列操作，和**栈**一样。它也可以继承双链表(SplDoublyLinkedList)轻松实现。

## 资料

这方面zendframework的底层有所重写实现，可以参考

<https://github.com/zendframework/zend-stdlib/blob/master/src/SplQueue.php>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://phper.shujuwajue.com/biao-zhun-php-ku-ff08-spl/shu-ju-jie-gou/splqueue-dui-lie.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
