|
unserializeCreates a PHP value from a stored representation Description
mixed unserialize
( string
$str
)unserialize takes a single serialized variable and converts it back into a PHP value. Parameters
Return ValuesThe converted value is returned, and can be a boolean, integer, float, string, array or object.
In case the passed string is not unserializeable, Changelog
Examples
Example #1 unserialize example
<?php
Example #2 unserialize_callback_func example
<?php NotesWarning
Warning
Do not pass untrusted user input to 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. Use a safe, standard data interchange format such as JSON (via json_decode and json_encode) if you need to pass serialized data to the user. |