<?php
/*
* Examples of DoublyLinkedList
*/
$obj = new SplDoublyLinkedList();
// Check wither linked list is empty
if ($obj->isEmpty())
{
echo "Adding nodes to Linked List<br>";
$obj->push(2);
$obj->push(3);
echo "Adding the node at beginning of doubly linked list <br>";
$obj->unshift(10);
}
echo "<br>Our Linked List:";
print_r($obj);
echo "<br>Pick the node from beginning of doubly linked list";
echo $obj->bottom();
?>
SplDoublyLinkedList::bottom
(PHP 5 >= 5.3.0)
SplDoublyLinkedList::bottom — Ver el nodo de el comienzo de la lista doblemente enlazada
Descripción
Parámetros
Esta función no tiene parámetros.
Valores devueltos
El valor de el primer nodo.
Errores/Excepciones
Lanza una excepción RuntimeException cuando la estructura de datos está vacía.
rakesh dot mishra at gmail dot com ¶
2 years ago
