PHP Doku:: Unserializes a storage from its string representation - splobjectstorage.unserialize.html

Verlauf / Chronik / History: (3) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzSonstige GrunderweiterungenStandard PHP Library (SPL)DatenstrukturenThe SplObjectStorage classSplObjectStorage::unserialize

Ein Service von Reinhard Neidl - Webprogrammierung.

The SplObjectStorage class

<<SplObjectStorage::setInfo

SplObjectStorage::valid>>

SplObjectStorage::unserialize

(PHP 5 >= 5.2.2)

SplObjectStorage::unserializeUnserializes a storage from its string representation

Beschreibung

public void SplObjectStorage::unserialize ( string $serialized )

Unserializes storage entries and attach them to the current storage.

Parameter-Liste

serialized

The serialized representation of a storage.

Rückgabewerte

Es wird kein Wert zurückgegeben.

Beispiele

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

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

int(1)

Siehe auch


Keine BenutzerBeiträge.
- Beiträge aktualisieren...



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)