downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

SplDoublyLinkedList::bottom> <Estructuras de datos
[edit] Last updated: Fri, 24 May 2013

view this page in

La clase SplDoublyLinkedList

(PHP 5 >= 5.3.0)

Introducción

La clase SplDoublyLinkedList proporciona las principales funcionalidades para una lista doblemente enlazada.

Sinopsis de la Clase

SplDoublyLinkedList implements Iterator , ArrayAccess , Countable {
/* Métodos */
__construct ( void )
mixed bottom ( void )
int count ( void )
mixed current ( void )
int getIteratorMode ( void )
bool isEmpty ( void )
mixed key ( void )
void next ( void )
bool offsetExists ( mixed $index )
mixed offsetGet ( mixed $index )
void offsetSet ( mixed $index , mixed $newval )
void offsetUnset ( mixed $index )
mixed pop ( void )
void prev ( void )
void push ( mixed $value )
void rewind ( void )
public string serialize ( void )
void setIteratorMode ( int $mode )
mixed shift ( void )
mixed top ( void )
public void unserialize ( string $serialized )
void unshift ( mixed $value )
bool valid ( void )
}

Tabla de contenidos



add a note add a note User Contributed Notes SplDoublyLinkedList - [1 notes]
up
-9
rakesh dot mishra at gmail dot com
2 years ago
Here is simple examples of SplQueue: -
<?php
echo "Create Object of Spl. Queue:";
$obj = new SplQueue();

echo
"<br>Check for Queue is Empty:";
if(
$obj->isEmpty())
{
   
$obj->enqueue("Simple");
   
$obj->enqueue("Example");
   
$obj->enqueue("Of");
   
$obj->enqueue("PHP");
}

echo
"<br>View queue:";
print_r($obj);

if(!
$obj->offsetExists(4))
{
   
$obj->enqueue(10);
}

print_r($obj);

echo
"<br>Get the value of the offset at 3 ";
if(
$obj->offsetGet(3))
{
    echo
$obj->offsetGet(3);
   
    echo
"<br>Resetting the value of a node:";
   
$obj->offsetSet(4,6);
}
?>

 
show source | credits | sitemap | contact | advertising | mirror sites