array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'tr', ), 'this' => array ( 0 => 'splobjectstorage.unserialize.php', 1 => 'SplObjectStorage::unserialize', ), 'up' => array ( 0 => 'class.splobjectstorage.php', 1 => 'SplObjectStorage', ), 'prev' => array ( 0 => 'splobjectstorage.setinfo.php', 1 => 'SplObjectStorage::setInfo', ), 'next' => array ( 0 => 'splobjectstorage.valid.php', 1 => 'SplObjectStorage::valid', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/spl/splobjectstorage/unserialize.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5 >= 5.2.2, PHP 7, PHP 8)
SplObjectStorage::unserialize — Unserializes a storage from its string representation
Unserializes storage entries and attach them to the current storage.
data
The serialized representation of a storage.
Hiçbir değer dönmez.
Ö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)