PHP serialize and unserialize

unserialize() function is used to convert the serialized data into PHP value. The converted value is normally a boolean, integer, float, string, array or object type. On the other hand serialize() function takes mixed type of value and returns a string containing sequence of bits of that value which can be stored in a file, databases or transferred through network connection without losing their data type and structure.