Introduction to serialization

What is the serialization process?

Serialization is the process of taking an object from memory and converting it into a series of bytes so that it can be stored or transmitted over a network and then reconstructed later on, perhaps by a different program or in a different machine environment.

image.png

Now what is the deserialization?

Deserialization is the reverse action: taking serialized data and reconstructing the original object in memory.

image.png

What languages support the serialization?

Many object-oriented programming languages support serialization natively, including, but not limited to:

image.png

In this module we will focus on the deserialization using PHP and Python languages

PHP Serialization

Let’s try to make and array using PHP

$original_data = array("HTB", 123, 7.77);

image.png