SplDoublyLinkedList::__construct
(PHP 5 >= 5.3.0)
SplDoublyLinkedList::__construct — Construit une nouvelle liste
Description
public SplDoublyLinkedList::__construct()
( void
)
Construit une nouvelle liste.
Liste de paramètres
Cette fonction ne contient aucun paramètre.
Valeurs de retour
Aucune valeur n'est retournée.
Exemples
Exemple #1 Exemple avec SplDoublyLinkedList::__construct()
<?php
$dll = new SplDoublyLinkedList();
$dll->push(2);
$dll->push(3);
$dll->unshift(5);
var_dump($dll);
?>L'exemple ci-dessus va afficher :
object(SplDoublyLinkedList)#1 (2) {
["flags":"SplDoublyLinkedList":private]=>
int(0)
["dllist":"SplDoublyLinkedList":private]=>
array(3) {
[0]=>
int(5)
[1]=>
int(2)
[2]=>
int(3)
}
}
