PHP 8.5.0 Alpha 4 available for testing

Voting

: three plus zero?
(Example: nine)

The Note You're Voting On

tstirrat at gmail dot com
11 years ago
A note on top() and bottom():

Picture the doubly-linked list (or queue) in the same way that you would a stack.

Say you started with an empty queue, and added five values:

$myList = new SplDoublyLinkedList

$mylist->push(1)
$mylist->push(2)
$mylist->push(3)
$mylist->push(4)
$mylist->push(5)

$mylist->top()
-> 5

$mylist->bottom()
-> 1

<< Back to user notes page

To Top