SplDoublyLinkedList::unserialize

(PHP 5 >= 5.4.0)

SplDoublyLinkedList::unserializeUnserializes the storage

說明

public void SplDoublyLinkedList::unserialize ( string $serialized )

Unserializes the storage, from SplDoublyLinkedList::serialize().

Warning

此函式目前沒有參考文件;只有引數列表。

參數

serialized

The serialized string.

回傳值

無回傳值。

參見

add a note add a note

User Contributed Notes 1 note

up
-1
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