# Serialize

The Serialize component is in charge of handling variable serialize and deserialize.

# Serialize a variable

The Chevere/Serialize/Serialize component is in charge of handling serialize.

use Chevere\Serialize\Serialize;

$serialize = new Serialize($foo);

The __toString method is used to access the serialized variable.

$string = $serialize->__toString();

# Deserialize a variable

The Chevere/Serialize/Deserialize component is in charge of handling deserialize.

use Chevere\Serialize\Deserialize;

$deserialize = new Deserialize(serialized: $bar);

# Access variable

The var method is used to access the deserialized variable.

$var = $deserialize->var();

# Variable type

The type method is used to access the deserialized variable type.

$type = $deserialize->type();
Last Updated: 10/11/2022, 11:12:32 PM