igbinary_unserialize
igbinary_unserialize
Creates a PHP value from a stored representation from igbinary_serialize
mixed **igbinary_unserialize** string $str
takes a single serialized variable from
and converts it back into a PHP value.
igbinary_unserialize``igbinary_serialize
Waarschuwing: > Untrusted user input must not be passed to . 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 and ) should be used, if serialized data needs to be passed to a client.
igbinary_unserialize``json_decode``json_encodeIf there is the need to unserialize externally-stored serialized data, can be used for data validation. It is important to ensure that nobody has tampered with the data.
hash_hmac
Waarschuwing: > 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.
str
The serialized string generated by .
igbinary_serialize
If the value being unserialized is an object, after successfully
reconstructing the object igbinary will automatically attempt to call the
or
methods (if one exists).
__unserialize()__wakeup()
Opmerking: > ### unserialize_callback_func directive
The callback specified in the directive is called when an undefined class is unserialized. If no callback is specified, the object will be instantiated as . unserialize_callback_func`__PHP_Incomplete_Class`
The converted value is returned, and can be a ,
, , ,
, , or .
bool``int``float``string``array``object``null
In case the passed string is not unserializeable, false is returned and
or is issued.
E_NOTICE``E_WARNING
Objects may throw s in their unserialization handlers.
Throwable
Waarschuwing: > 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 with or or by catching the issued .
str``igbinary_serialize(null)``igbinary_serialize(false)``E_NOTICE
unserialize``json_encode``json_decode``hash_hmac``igbinary_serializeAutoloading Classesunserialize_callback_func__wakeup()__serialize()__unserialize()