PHP 7.4.22 Released!

SplObjectStorage::unserialize

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

SplObjectStorage::unserializeUnserializes a storage from its string representation

Açıklama

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

Unserializes storage entries and attach them to the current storage.

Değiştirgeler

serialized

The serialized representation of a storage.

Dönen Değerler

Hiçbir değer dönmez.

Örnekler

Örnek 1 SplObjectStorage::unserialize() example

<?php
$s1 
= new SplObjectStorage;
$s2 = new SplObjectStorage;
$o = new StdClass;
$s1[$o] = "data";

$s2->unserialize($s1->serialize());

var_dump(count($s2));
?>

Yukarıdaki örnek şuna benzer bir çıktı üretir:

int(1)

Ayrıca Bakınız

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top