(PHP 5 >= 5.3.0, PHP 7, PHP 8)
The SplDoublyLinkedList class provides the main functionalities of a doubly linked list.
SplDoublyLinkedList::IT_MODE_LIFOThe list will be iterated in a last in, first out order, like a stack.
SplDoublyLinkedList::IT_MODE_FIFOThe list will be iterated in a first in, first out order, like a queue.
SplDoublyLinkedList::IT_MODE_DELETEIteration will remove the iterated elements.
SplDoublyLinkedList::IT_MODE_KEEPIteration will not remove the iterated elements.