> For the complete documentation index, see [llms.txt](https://phper.shujuwajue.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://phper.shujuwajue.com/biao-zhun-php-ku-ff08-spl/shu-ju-jie-gou/splqueue-dui-lie.md).

# SplQueue - 队列

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

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

![](https://1303647163-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LfnT30woYyQ9bJF96Hh%2F-LfnTB5KYnkOx0V3e4EY%2F-LfnTKMvw0Yu9bpo5Do2%2FSplQueue.png?generation=1558862986493719\&alt=media)

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

## 资料

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

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