array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'spldoublylinkedlist.top.php', 1 => 'SplDoublyLinkedList::top', 2 => 'Peeks at the node from the end of the doubly linked list', ), 'up' => array ( 0 => 'class.spldoublylinkedlist.php', 1 => 'SplDoublyLinkedList', ), 'prev' => array ( 0 => 'spldoublylinkedlist.shift.php', 1 => 'SplDoublyLinkedList::shift', ), 'next' => array ( 0 => 'spldoublylinkedlist.unserialize.php', 1 => 'SplDoublyLinkedList::unserialize', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/spl/spldoublylinkedlist/top.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

SplDoublyLinkedList::top

(PHP 5 >= 5.3.0, PHP 7, PHP 8)

SplDoublyLinkedList::topPeeks at the node from the end of the doubly linked list

说明

public SplDoublyLinkedList::top(): mixed

参数

此函数没有参数。

返回值

The value of the last node.

错误/异常

Throws RuntimeException when the data-structure is empty.