PHP 5.4.31 Released

SplObjectStorage::unserialize

(PHP 5 >= 5.2.2)

SplObjectStorage::unserializeUnserializes a storage from its string representation

Descrizione

public void SplObjectStorage::unserialize ( string $serialized )

Unserializes storage entries and attach them to the current storage.

Elenco dei parametri

serialized

The serialized representation of a storage.

Valori restituiti

Nessun valore viene restituito.

Esempi

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

Il precedente esempio visualizzerĂ  qualcosa simile a:

int(1)

Vedere anche:

add a note add a note

User Contributed Notes

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