downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

SplObjectStorage::valid> <SplObjectStorage::setInfo
[edit] Last updated: Tue, 21 May 2013

view this page in

SplObjectStorage::unserialize

(PHP 5 >= 5.2.2)

SplObjectStorage::unserializeUnserializes a storage from its string representation

Descrição

public void SplObjectStorage::unserialize ( string $serialized )

Unserializes storage entries and attach them to the current storage.

Parâmetros

serialized

The serialized representation of a storage.

Valor Retornado

Não há valor retornado.

Exemplos

Exemplo #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));
?>

O exemplo acima irá imprimir algo similar à:

int(1)

Veja Também



add a note add a note User Contributed Notes SplObjectStorage::unserialize - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites