array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'class.spldoublylinkedlist.php', 1 => 'SplDoublyLinkedList', ), 'up' => array ( 0 => 'spl.datastructures.php', 1 => '数据结构', ), 'prev' => array ( 0 => 'spl.datastructures.php', 1 => '数据结构', ), 'next' => array ( 0 => 'spldoublylinkedlist.add.php', 1 => 'SplDoublyLinkedList::add', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'zh', 'path' => 'reference/spl/spldoublylinkedlist.xml', ), 'extra_header_links' => array ( 'rel' => 'alternate', 'href' => '/manual/en/feeds/class.spldoublylinkedlist.atom', 'type' => 'application/atom+xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5 >= 5.3.0, PHP 7, PHP 8)
SplDoublyLinkedList 类提供双向链表的主要功能。
SplDoublyLinkedList::IT_MODE_LIFO
列表将以先进后出的顺序迭代,就像栈一样。
SplDoublyLinkedList::IT_MODE_FIFO
列表将以先进先出的顺序迭代,就像队列一样。
SplDoublyLinkedList::IT_MODE_DELETE
迭代将移除已迭代的元素。
SplDoublyLinkedList::IT_MODE_KEEP
迭代将不会移除已迭代的元素。