SplDoublyLinkedList::serialize

(PHP 5 >= 5.4.0, PHP 7, PHP 8)

SplDoublyLinkedList::serializeSerializes the storage

Descrizione

public SplDoublyLinkedList::serialize(): string

Serializes the storage.

Avviso

Questa funzione, al momento non è documentata; è disponibile soltanto la lista degli argomenti.

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

The serialized string.

Vedere anche:

add a note add a note

User Contributed Notes 1 note

up
0
lincoln dot du dot j at gmail dot com
6 years ago
$a = new SplDoublyLinkedList;
$arr=[1,2,3,4,5,6,7,8,9];

for($i=0;$i<count($arr);$i++){
    $a->add($i,$arr[$i]);
}

$serialize=serialize($a);

echo $serialize;

echo PHP_EOL,PHP_EOL;

$unserialze=unserialize($serialize);

print_r($unserialze);
To Top