SplDoublyLinkedList::unserialize

(PHP 5 >= 5.4.0, PHP 7)

SplDoublyLinkedList::unserializeUnserializes the storage

说明

public SplDoublyLinkedList::unserialize ( string $serialized ) : void

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

Warning

本函数还未编写文档,仅有参数列表。

参数

serialized

The serialized string.

返回值

没有返回值。

参见

User Contributed Notes

lincoln dot du dot j at gmail dot com 11-Jul-2017 05:52
$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);