SplDoublyLinkedList::serialize
(PHP 5 >= 5.4.0, PHP 7, PHP 8)
SplDoublyLinkedList::serialize — Serializes the storage
说明
public SplDoublyLinkedList::serialize(): string
Serializes the storage.
警告
本函数还未编写文档,仅有参数列表。
参数
此函数没有参数。
返回值
The serialized string.

User Contributed Notes 1 note
lincoln dot du dot j at gmail dot com ¶
4 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);
备份地址:http://www.lvesu.com/blog/php/spldoublylinkedlist.serialize.php