(PHP 5 >= 5.3.0, PHP 7)
The SplDoublyLinkedList class provides the main functionalities of a doubly linked list.
public add ( mixed $index , mixed $newval ) : void
public bottom ( ) : mixed
public count ( ) : int
public current ( ) : mixed
public getIteratorMode ( ) : int
public isEmpty ( ) : bool
public key ( ) : mixed
public next ( ) : void
public offsetExists ( mixed $index ) : bool
public offsetGet ( mixed $index ) : mixed
public offsetSet ( mixed $index , mixed $newval ) : void
public offsetUnset ( mixed $index ) : void
public pop ( ) : mixed
public prev ( ) : void
public push ( mixed $value ) : void
public rewind ( ) : void
public serialize ( ) : string
public setIteratorMode ( int $mode ) : void
public shift ( ) : mixed
public top ( ) : mixed
public unserialize ( string $serialized ) : void
public unshift ( mixed $value ) : void
public valid ( ) : bool}
SplDoublyLinkedList::IT_MODE_LIFO
The list will be iterated in a last in, first out order, like a stack.
SplDoublyLinkedList::IT_MODE_FIFO
The list will be iterated in a first in, first out order, like a queue.
SplDoublyLinkedList::IT_MODE_DELETE
Iteration will remove the iterated elements.
SplDoublyLinkedList::IT_MODE_KEEP
Iteration will not remove the iterated elements.
© 1997–2020 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/class.spldoublylinkedlist.php