(PHP 5 >= 5.3.0, PHP 7)
SplDoublyLinkedList::__construct — Construit une nouvelle liste
Construit une nouvelle liste.
Cette fonction ne contient aucun paramètre.
Aucune valeur n'est retournée.
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)
  }
}