igbinary_unserialize

(PECL igbinary >= 1.1.1)

igbinary_unserialize Creates a PHP value from a stored representation from igbinary_serialize()

Beschreibung

igbinary_unserialize(string $str): mixed

igbinary_unserialize() takes a single serialized variable from igbinary_serialize() and converts it back into a PHP value.

Warnung

Untrusted user input must not be passed to igbinary_unserialize(). Unserialization can result in code being loaded and executed due to object instantiation and autoloading, and a malicious user may be able to exploit this. Instead a safe, standard data interchange format such as JSON (via json_decode() and json_encode()) should be used, if serialized data needs to be passed to a client.

If there is the need to unserialize externally-stored serialized data, hash_hmac() can be used for data validation. It is important to ensure that nobody has tampered with the data.

Warnung

The igbinary serialization format does not provide a way to distinguish between different reference groups for the same value. All PHP references to a given value as treated as part of the same reference group when unserialized, even if they were parts of difference reference groups when serialized.

Parameter-Liste

str

The serialized string generated by igbinary_serialize().

If the value being unserialized is an Objekt, after successfully reconstructing the object igbinary will automatically attempt to call the __unserialize() or __wakeup() methods (if one exists).

Hinweis: unserialize_callback_func directive

It is possible to set a callback function which will be called, if an undefined class should be instantiated during unserializing. (to prevent getting an incomplete object __PHP_Incomplete_Class.) The php.ini, ini_set() or .htaccess can be used to define unserialize_callback_func. Everytime an undefined class should be instantiated, it will be called. To disable this feature this setting should be emptied.

Rückgabewerte

The converted value is returned, and can be a bool, int, float, string, array, object, or null.

In case the passed string is not unserializeable, false is returned and E_NOTICE or E_WARNING is issued.

Fehler/Exceptions

Objects may throw Throwables in their unserialization handlers.

Anmerkungen

Warnung

null or false is returned both in the case of an error and if unserializing the serialized null or false value. It is possible to catch this special case by comparing str with igbinary_serialize(null) or igbinary_serialize(false) or by catching the issued E_NOTICE.

Siehe auch

Hier Kannst Du einen Kommentar verfassen


Bitte gib mindestens 10 Zeichen ein.
Wird geladen... Bitte warte.
* Pflichtangabe
Es sind noch keine Kommentare vorhanden.

PHP cURL-Tutorial: Verwendung von cURL zum Durchführen von HTTP-Anfragen

cURL ist eine leistungsstarke PHP-Erweiterung, die es Ihnen ermöglicht, mit verschiedenen Servern über verschiedene Protokolle wie HTTP, HTTPS, FTP und mehr zu kommunizieren. ...

TheMax

Autor : TheMax
Kategorie: PHP-Tutorials

Midjourney Tutorial - Anleitung für Anfänger

Über Midjourney, dem Tool zur Erstellung digitaler Bilder mithilfe von künstlicher Intelligenz, gibt es ein informatives Video mit dem Titel "Midjourney Tutorial auf Deutsch - Anleitung für Anfänger" ...

Mike94

Autor : Mike94
Kategorie: KI Tutorials

Grundlagen von Views in MySQL

Views in einer MySQL-Datenbank bieten die Möglichkeit, eine virtuelle Tabelle basierend auf dem Ergebnis einer SQL-Abfrage zu erstellen. ...

admin

Autor : admin
Kategorie: mySQL-Tutorials

Tutorial veröffentlichen

Tutorial veröffentlichen

Teile Dein Wissen mit anderen Entwicklern weltweit

Du bist Profi in deinem Bereich und möchtest dein Wissen teilen, dann melde dich jetzt an und teile es mit unserer PHP-Community

mehr erfahren

Tutorial veröffentlichen

Spielplan für 4 Gruppen zu je 6 Teams auf 2 Feldern

Hey, hallöchen! Du musst die Spiele so durchgehen, dass die Platzierung kontrolliert wechseln, dass jedes Team auf den Plätzen spielt. Hier ist ...

Geschrieben von Nico_Schubert am 14.05.2024 07:17:28
Forum: PHP Developer Forum
Bild drehen

Hallo, Du hast den Drehwinkel und den Pfad zum Bild bereits richtig im Post-Array. Hier ist ein vollständiges Beispiel, wie du das Bild drehst u ...

Geschrieben von Nico_Schubert am 14.05.2024 06:55:15
Forum: PHP Developer Forum
Berechnungen durchführen

Hallo Matze, gerne helfe ich dir bei deinem Projekt. Lass uns deine Fragen Schritt für Schritt angehen: Erste Frage: Ist das Konstrukt so richt ...

Geschrieben von Nico_Schubert am 14.05.2024 06:43:13
Forum: PHP Developer Forum
Bild drehen

Ich denke, dass die Aussage von scatello richtig ist und stimme ihm zu.

Geschrieben von LucyCoffee am 10.05.2024 12:04:18
Forum: PHP Developer Forum